fix(embed): wire local pinia into toolbar store usage

This commit is contained in:
2026-02-24 23:20:23 +08:00
parent 2e61397758
commit d97ec0df4d
2 changed files with 13 additions and 4 deletions

View File

@@ -123,8 +123,16 @@ import { ElMessageBox } from "element-plus";
import { useGlobalMessage } from "@/ts/useGlobalMessage";
import { getLogicFlowInstance } from "@/ts/useLogicFlow";
import { useCanvasSettings } from '@/ts/useCanvasSettings';
import type { Pinia } from 'pinia';
const filesStore = useFilesStore();
const props = withDefaults(defineProps<{
isEmbed?: boolean;
piniaInstance?: Pinia;
}>(), {
isEmbed: false
});
const filesStore = props.piniaInstance ? useFilesStore(props.piniaInstance) : useFilesStore();
const { showMessage } = useGlobalMessage();
const { selectionEnabled, snapGridEnabled, snaplineEnabled } = useCanvasSettings();