@zhangqingcq/vgce 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vgce.js +35 -35
- package/dist/vgce.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/svg-editor/index.vue +9 -3
package/package.json
CHANGED
@@ -31,6 +31,7 @@
|
|
31
31
|
import { useGlobalStore } from '@/stores/global'
|
32
32
|
import { useConfigStore } from '@/stores/config'
|
33
33
|
import { fileRead, fileWrite } from '@/utils/file-read-write'
|
34
|
+
import { useEditPrivateStore } from '@/stores/system'
|
34
35
|
|
35
36
|
const props = withDefaults(defineProps<{ customToolbar?: IConfig; data?: string; saveFile?: boolean }>(), {
|
36
37
|
saveFile: false
|
@@ -38,6 +39,7 @@
|
|
38
39
|
const globalStore = useGlobalStore(pinia)
|
39
40
|
const svgEditLayoutStore = useSvgEditLayoutStore(pinia)
|
40
41
|
const configStore = useConfigStore(pinia)
|
42
|
+
const editPrivateStore = useEditPrivateStore(pinia)
|
41
43
|
const importJsonRef = ref<InstanceType<typeof ImportJson>>()
|
42
44
|
const visible_conf: IVisibleConf = reactive({
|
43
45
|
[EVisibleConfKey.ExportJson]: false,
|
@@ -70,6 +72,9 @@
|
|
70
72
|
globalStore.setDoneJson(done_json)
|
71
73
|
}
|
72
74
|
onMounted(() => {
|
75
|
+
//清除外部传入不同数据,形成历史记录的问题
|
76
|
+
editPrivateStore.history_doneComponent = []
|
77
|
+
editPrivateStore.history_now_index = 0
|
73
78
|
if (props.data) {
|
74
79
|
useImportDataModel(props.data)
|
75
80
|
} else {
|
@@ -77,9 +82,6 @@
|
|
77
82
|
}
|
78
83
|
globalStore.intention = EGlobalStoreIntention.None
|
79
84
|
})
|
80
|
-
defineExpose({
|
81
|
-
setGraphNodeJson
|
82
|
-
})
|
83
85
|
|
84
86
|
const { appContext } = getCurrentInstance()!
|
85
87
|
|
@@ -97,6 +99,10 @@
|
|
97
99
|
emits('onSave', d)
|
98
100
|
}
|
99
101
|
}
|
102
|
+
|
103
|
+
defineExpose({
|
104
|
+
setGraphNodeJson
|
105
|
+
})
|
100
106
|
</script>
|
101
107
|
<template>
|
102
108
|
<div>
|