virtual sample : show static vue files
This commit is contained in:
parent
1398da62be
commit
9ed050b122
6 changed files with 42 additions and 7 deletions
|
|
@ -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 };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue