kanban > virtual sample dialog : start with tab static if no dynamic files
This commit is contained in:
parent
e110c85c69
commit
df64a91987
1 changed files with 4 additions and 4 deletions
|
|
@ -3,13 +3,13 @@ import { ref, watch } from "vue";
|
||||||
import { usePageStore } from "./page";
|
import { usePageStore } from "./page";
|
||||||
|
|
||||||
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
|
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
|
||||||
const activeTab = ref("dynamic");
|
|
||||||
const currentFile = ref(null);
|
|
||||||
const isLoopAnimationEnabled = ref(false);
|
|
||||||
|
|
||||||
const { page } = usePageStore();
|
const { page } = usePageStore();
|
||||||
const step = page.steps.find((step) => step.id === "virtualSample");
|
const step = page.steps.find((step) => step.id === "virtualSample");
|
||||||
|
|
||||||
|
const activeTab = ref(step.files.dynamic ? "dynamic" : "static");
|
||||||
|
const currentFile = ref(null);
|
||||||
|
const isLoopAnimationEnabled = ref(false);
|
||||||
|
|
||||||
watch(activeTab, () => (currentFile.value = null));
|
watch(activeTab, () => (currentFile.value = null));
|
||||||
|
|
||||||
return { activeTab, currentFile, step, isLoopAnimationEnabled };
|
return { activeTab, currentFile, step, isLoopAnimationEnabled };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue