12 lines
313 B
JavaScript
12 lines
313 B
JavaScript
|
|
import { defineStore } from "pinia";
|
||
|
|
import { ref, watch } from "vue";
|
||
|
|
|
||
|
|
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
|
||
|
|
const activeTab = ref("dynamic");
|
||
|
|
const currentFile = ref(null);
|
||
|
|
|
||
|
|
watch(activeTab, () => (currentFile.value = null));
|
||
|
|
|
||
|
|
return { activeTab, currentFile };
|
||
|
|
});
|