@zhangqingcq/vgce 0.0.28 → 0.0.30

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.28",
3
+ "version": "0.0.30",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -152,6 +152,7 @@
152
152
  return { cursor: t ? 'pointer' : 'default' }
153
153
  }
154
154
  const eventHandle = (root: IDoneJson, type: EEventType) => {
155
+ console.log(root.events, type)
155
156
  if (root.events?.length > 0) {
156
157
  for (let e of root.events) {
157
158
  if (e.type === type) {
@@ -174,7 +175,7 @@
174
175
  if (e.attrs && e.attrs.length > 0) {
175
176
  let t
176
177
  if (e.target) {
177
- for (let item of globalStore.done_json) {
178
+ for (let item of preview_data.done_json) {
178
179
  if (item.id === e.target) {
179
180
  t = item
180
181
  break
@@ -188,11 +189,9 @@
188
189
  continue
189
190
  }
190
191
 
191
- console.log(t, e)
192
-
193
192
  for (let a of e.attrs) {
194
- if (t.state && t.state.hasOwnProperty(a.key)) {
195
- t.state[a.key].default = valFormat(a.val)
193
+ if (a.key === 'state') {
194
+ t.defaultState = valFormat(a.val)
196
195
  } else if (t.props.hasOwnProperty(a.key)) {
197
196
  t.props[a.key].val = valFormat(a.val)
198
197
  }