@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangqingcq/vgce",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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>