virtual sample : show static vue files

This commit is contained in:
isUnknown 2024-11-21 13:20:57 +01:00
parent 1398da62be
commit 9ed050b122
6 changed files with 42 additions and 7 deletions

View file

@ -1,11 +1,15 @@
import { defineStore } from "pinia";
import { ref, watch } from "vue";
import { usePageStore } from "./page";
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
const activeTab = ref("dynamic");
const currentFile = ref(null);
const { page } = usePageStore();
const step = page.steps.find((step) => step.id === "virtualSample");
watch(activeTab, () => (currentFile.value = null));
return { activeTab, currentFile };
return { activeTab, currentFile, step };
});