cnhis-design-vue 3.4.0-beta.67 → 3.4.0-beta.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -327,17 +327,18 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
327
327
  ...origin
328
328
  };
329
329
  if (key === "remove" || mode === "add") {
330
+ const eventName = key === "remove" ? "remove" : "add";
330
331
  if (key === "remove") {
331
332
  updateData(params, "remove");
332
333
  } else {
333
334
  const pointKey = origin.linkKey || origin.key;
334
- params.data = {
335
+ params.data = [{
335
336
  time: getXValue(pointer.x),
336
337
  value: getYValue(origin.type, pointer.y),
337
338
  ...origin.linkKey && {
338
339
  key: origin.key
339
340
  }
340
- };
341
+ }];
341
342
  updateData({
342
343
  ...params,
343
344
  key: pointKey
@@ -350,7 +351,7 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
350
351
  limitRight
351
352
  });
352
353
  }
353
- emits(key, params);
354
+ emits(eventName, params);
354
355
  } else {
355
356
  (_c = extraMenuConfig.click) == null ? void 0 : _c.call(extraMenuConfig, key, params);
356
357
  }
@@ -553,9 +553,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
553
553
  hide: boolean;
554
554
  }>;
555
555
  draggable: boolean;
556
+ isHighlightRow: boolean;
556
557
  idx: number;
557
558
  isHighlight: boolean;
558
- isHighlightRow: boolean;
559
559
  isFieldSet: boolean;
560
560
  fieldDescribeMode: "column" | "tooltip";
561
561
  hideExpressionOption: AnyObject[];
@@ -594,9 +594,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
594
594
  hide: boolean;
595
595
  }>;
596
596
  draggable: boolean;
597
+ isHighlightRow: boolean;
597
598
  idx: number;
598
599
  isHighlight: boolean;
599
- isHighlightRow: boolean;
600
600
  isFieldSet: boolean;
601
601
  fieldDescribeMode: "column" | "tooltip";
602
602
  hideExpressionOption: AnyObject[];
@@ -773,9 +773,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
773
773
  hide: boolean;
774
774
  }>;
775
775
  draggable: boolean;
776
+ isHighlightRow: boolean;
776
777
  idx: number;
777
778
  isHighlight: boolean;
778
- isHighlightRow: boolean;
779
779
  isFieldSet: boolean;
780
780
  fieldDescribeMode: "column" | "tooltip";
781
781
  hideExpressionOption: AnyObject[];
@@ -384,9 +384,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
384
384
  hide: boolean;
385
385
  }>;
386
386
  draggable: boolean;
387
+ isHighlightRow: boolean;
387
388
  idx: number;
388
389
  isHighlight: boolean;
389
- isHighlightRow: boolean;
390
390
  isFieldSet: boolean;
391
391
  fieldDescribeMode: "column" | "tooltip";
392
392
  hideExpressionOption: AnyObject[];
@@ -147,7 +147,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
147
147
  return treeMap.get(key);
148
148
  }).filter((tag) => !props.uncheckableField || props.uncheckableField && !tag.originItem[props.uncheckableField]);
149
149
  if (isRemote.value) {
150
- return [...remoteDefaultList.value, ...re];
150
+ const mergeTags = [...remoteDefaultList.value, ...re];
151
+ const seen = /* @__PURE__ */ new Set();
152
+ const unique = mergeTags.filter((item) => {
153
+ const k = item.key;
154
+ if (seen.has(k))
155
+ return false;
156
+ seen.add(k);
157
+ return true;
158
+ });
159
+ return unique;
151
160
  }
152
161
  return re;
153
162
  });
@@ -186,6 +195,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
186
195
  label: tag.name
187
196
  };
188
197
  });
198
+ checkedKeys.value = props.defaultList.map((v) => v.key).filter((key) => treeMap.has(key));
199
+ return;
189
200
  }
190
201
  checkedKeys.value = props.defaultList.filter((k) => treeMap.has(k));
191
202
  }
@@ -213,6 +224,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
213
224
  });
214
225
  curNode.children = tempData.treeItems;
215
226
  }
227
+ const defaultKeys = props.defaultList.map((v) => v.key).filter((key) => treeMap.has(key));
228
+ if (defaultKeys == null ? void 0 : defaultKeys.length) {
229
+ checkedKeys.value = [.../* @__PURE__ */ new Set([...checkedKeys.value, ...defaultKeys])];
230
+ }
216
231
  return curNode;
217
232
  }
218
233
  return node;
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.4.0-beta.67";
2
+ var version = "3.4.0-beta.69";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.4.0-beta.67",
3
+ "version": "3.4.0-beta.69",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -73,5 +73,5 @@
73
73
  "iOS 7",
74
74
  "last 3 iOS versions"
75
75
  ],
76
- "gitHead": "849fdaddc5217f0376aefd8d9dec58a234f5d3b9"
76
+ "gitHead": "3a448dd677e5f5a9d77efe19512c3206e4e17ff9"
77
77
  }