cnhis-design-vue 3.3.3-beta.10 → 3.3.3-beta.13

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.
Files changed (26) hide show
  1. package/es/components/expand-field/index.d.ts +73 -2
  2. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +73 -2
  3. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +73 -2
  4. package/es/components/expand-field/src/components/form.vue.d.ts +73 -2
  5. package/es/components/expand-field/src/index.vue.d.ts +73 -2
  6. package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
  7. package/es/components/field-editor/src/fields.d.ts +1 -0
  8. package/es/components/field-editor/src/fields.js +6 -0
  9. package/es/components/field-set/src/FieldSet.vue.d.ts +31 -0
  10. package/es/components/field-set/src/FieldSet.vue2.js +112 -65
  11. package/es/components/field-set/src/Index.vue2.js +3 -2
  12. package/es/components/field-set/src/TableStyle.vue2.js +2 -2
  13. package/es/components/field-set/src/constants/index.d.ts +1 -1
  14. package/es/components/field-set/style/index.css +1 -1
  15. package/es/components/index.css +1 -1
  16. package/es/components/select-person/index.d.ts +73 -2
  17. package/es/components/select-person/src/SelectPerson.vue.d.ts +56 -2
  18. package/es/components/select-person/src/SelectPerson.vue2.js +49 -14
  19. package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
  20. package/es/components/select-person/src/components/TagItem.vue.js +6 -0
  21. package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
  22. package/es/components/select-person/src/index.vue.d.ts +73 -2
  23. package/es/components/select-person/src/index.vue2.js +4 -0
  24. package/es/components/select-person/style/index.css +1 -1
  25. package/es/shared/package.json.js +1 -1
  26. package/package.json +2 -2
@@ -118,6 +118,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
118
118
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
119
119
  default: undefined;
120
120
  };
121
+ showTagHover: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
121
125
  }, {
122
126
  $attrs: {
123
127
  [x: string]: unknown;
@@ -241,6 +245,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
241
245
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
242
246
  default: undefined;
243
247
  };
248
+ showTagHover: {
249
+ type: BooleanConstructor;
250
+ default: boolean;
251
+ };
244
252
  }>> & {
245
253
  onCheck?: ((...args: any[]) => any) | undefined;
246
254
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1351,6 +1359,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1351
1359
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
1352
1360
  default: undefined;
1353
1361
  };
1362
+ showTagHover: {
1363
+ type: BooleanConstructor;
1364
+ default: boolean;
1365
+ };
1354
1366
  }, {
1355
1367
  $message: import("naive-ui").MessageApi;
1356
1368
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1433,6 +1445,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1433
1445
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
1434
1446
  default: undefined;
1435
1447
  };
1448
+ showTagHover: {
1449
+ type: BooleanConstructor;
1450
+ default: boolean;
1451
+ };
1436
1452
  }>> & {}>>;
1437
1453
  emit: any;
1438
1454
  keyword: import("vue").Ref<string>;
@@ -1532,7 +1548,9 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1532
1548
  transformData: (trees: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject)[], parentNode: import("./src/types").PTreeOption | null, visitor?: Partial<Record<"enter" | "leave", (node: import("./src/types").PTreeOption) => unknown>> | undefined) => {
1533
1549
  treeItems: import("./src/types").PTreeOption[];
1534
1550
  leafCount: number;
1551
+ innerItems: any[];
1535
1552
  };
1553
+ getTreeOptionChildren: (item: import("./src/types").PTreeOption) => void;
1536
1554
  onSearch: () => Promise<void>;
1537
1555
  getAllKeys: (tree: import("./src/types").PTreeOption[], strategy: import("./src/types").Strategy) => (string | number)[];
1538
1556
  getParentKeys: (node: import("./src/types").PTreeOption, map: Map<string | number, import("./src/types").PTreeOption>) => never[];
@@ -1568,11 +1586,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1568
1586
  NInputGroup: any;
1569
1587
  NCheckbox: any;
1570
1588
  NTree: any;
1571
- NIcon: any;
1572
1589
  NSpace: any;
1573
1590
  NGrid: any;
1574
1591
  NGi: any;
1575
- CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1592
+ NPopover: any;
1576
1593
  SearchGroupList: import("vue").DefineComponent<{
1577
1594
  data: {
1578
1595
  type: import("vue").PropType<{
@@ -1702,6 +1719,46 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1702
1719
  }, {
1703
1720
  type: string;
1704
1721
  }>;
1722
+ TagItem: import("vue").DefineComponent<{
1723
+ tag: {
1724
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1725
+ required: true;
1726
+ };
1727
+ showClose: {
1728
+ type: BooleanConstructor;
1729
+ default: boolean;
1730
+ };
1731
+ }, {
1732
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1733
+ tag: {
1734
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1735
+ required: true;
1736
+ };
1737
+ showClose: {
1738
+ type: BooleanConstructor;
1739
+ default: boolean;
1740
+ };
1741
+ }>> & {
1742
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1743
+ }>>;
1744
+ emit: (event: "unchecked", ...args: any[]) => void;
1745
+ updateChecked: (key: string, checked: boolean) => void;
1746
+ NIcon: any;
1747
+ CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1748
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1749
+ tag: {
1750
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1751
+ required: true;
1752
+ };
1753
+ showClose: {
1754
+ type: BooleanConstructor;
1755
+ default: boolean;
1756
+ };
1757
+ }>> & {
1758
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1759
+ }, {
1760
+ showClose: boolean;
1761
+ }>;
1705
1762
  CDefaultPage: SFCWithInstall<import("vue").DefineComponent<{
1706
1763
  type: {
1707
1764
  type: StringConstructor;
@@ -1837,6 +1894,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1837
1894
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
1838
1895
  default: undefined;
1839
1896
  };
1897
+ showTagHover: {
1898
+ type: BooleanConstructor;
1899
+ default: boolean;
1900
+ };
1840
1901
  }>>, {
1841
1902
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject)[];
1842
1903
  defaultList: ((string | number) | {
@@ -1859,6 +1920,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1859
1920
  onlyForwardCascade: boolean;
1860
1921
  hideLeaf: boolean;
1861
1922
  itemKey: (node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number;
1923
+ showTagHover: boolean;
1862
1924
  }>>;
1863
1925
  getProps: import("vue").ComputedRef<Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1864
1926
  defaultList: {
@@ -1979,6 +2041,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1979
2041
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
1980
2042
  default: undefined;
1981
2043
  };
2044
+ showTagHover: {
2045
+ type: BooleanConstructor;
2046
+ default: boolean;
2047
+ };
1982
2048
  }>> & {
1983
2049
  onCheck?: ((...args: any[]) => any) | undefined;
1984
2050
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -2106,6 +2172,10 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
2106
2172
  type: import("vue").PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number>;
2107
2173
  default: undefined;
2108
2174
  };
2175
+ showTagHover: {
2176
+ type: BooleanConstructor;
2177
+ default: boolean;
2178
+ };
2109
2179
  }>> & {
2110
2180
  onCheck?: ((...args: any[]) => any) | undefined;
2111
2181
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -2148,5 +2218,6 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
2148
2218
  onlyForwardCascade: boolean;
2149
2219
  hideLeaf: boolean;
2150
2220
  itemKey: (node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject) => string | number;
2221
+ showTagHover: boolean;
2151
2222
  }>>;
2152
2223
  export default SelectPerson;
@@ -85,6 +85,10 @@ declare const _default: import("vue").DefineComponent<{
85
85
  type: PropType<(node: ITreeOption) => IKey>;
86
86
  default: undefined;
87
87
  };
88
+ showTagHover: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
88
92
  }, {
89
93
  $message: import("naive-ui").MessageApi;
90
94
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -164,6 +168,10 @@ declare const _default: import("vue").DefineComponent<{
164
168
  type: PropType<(node: ITreeOption) => IKey>;
165
169
  default: undefined;
166
170
  };
171
+ showTagHover: {
172
+ type: BooleanConstructor;
173
+ default: boolean;
174
+ };
167
175
  }>> & {}>>;
168
176
  emit: any;
169
177
  keyword: import("vue").Ref<string>;
@@ -263,7 +271,9 @@ declare const _default: import("vue").DefineComponent<{
263
271
  transformData: (trees: ITreeOption[], parentNode: PTreeOption | null, visitor?: Partial<Record<"enter" | "leave", (node: PTreeOption) => unknown>> | undefined) => {
264
272
  treeItems: PTreeOption[];
265
273
  leafCount: number;
274
+ innerItems: any[];
266
275
  };
276
+ getTreeOptionChildren: (item: PTreeOption) => void;
267
277
  onSearch: () => Promise<void>;
268
278
  getAllKeys: (tree: PTreeOption[], strategy: Strategy) => IKey[];
269
279
  getParentKeys: (node: PTreeOption, map: Map<IKey, PTreeOption>) => never[];
@@ -299,11 +309,10 @@ declare const _default: import("vue").DefineComponent<{
299
309
  NInputGroup: any;
300
310
  NCheckbox: any;
301
311
  NTree: any;
302
- NIcon: any;
303
312
  NSpace: any;
304
313
  NGrid: any;
305
314
  NGi: any;
306
- CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
315
+ NPopover: any;
307
316
  SearchGroupList: import("vue").DefineComponent<{
308
317
  data: {
309
318
  type: PropType<{
@@ -433,6 +442,46 @@ declare const _default: import("vue").DefineComponent<{
433
442
  }, {
434
443
  type: string;
435
444
  }>;
445
+ TagItem: import("vue").DefineComponent<{
446
+ tag: {
447
+ type: PropType<AnyObject>;
448
+ required: true;
449
+ };
450
+ showClose: {
451
+ type: BooleanConstructor;
452
+ default: boolean;
453
+ };
454
+ }, {
455
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
456
+ tag: {
457
+ type: PropType<AnyObject>;
458
+ required: true;
459
+ };
460
+ showClose: {
461
+ type: BooleanConstructor;
462
+ default: boolean;
463
+ };
464
+ }>> & {
465
+ onUnchecked?: ((...args: any[]) => any) | undefined;
466
+ }>>;
467
+ emit: (event: "unchecked", ...args: any[]) => void;
468
+ updateChecked: (key: string, checked: boolean) => void;
469
+ NIcon: any;
470
+ CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
471
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
472
+ tag: {
473
+ type: PropType<AnyObject>;
474
+ required: true;
475
+ };
476
+ showClose: {
477
+ type: BooleanConstructor;
478
+ default: boolean;
479
+ };
480
+ }>> & {
481
+ onUnchecked?: ((...args: any[]) => any) | undefined;
482
+ }, {
483
+ showClose: boolean;
484
+ }>;
436
485
  CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
437
486
  type: {
438
487
  type: StringConstructor;
@@ -565,6 +614,10 @@ declare const _default: import("vue").DefineComponent<{
565
614
  type: PropType<(node: ITreeOption) => IKey>;
566
615
  default: undefined;
567
616
  };
617
+ showTagHover: {
618
+ type: BooleanConstructor;
619
+ default: boolean;
620
+ };
568
621
  }>>, {
569
622
  data: ITreeOption[];
570
623
  defaultList: (IKey | ITag)[];
@@ -584,5 +637,6 @@ declare const _default: import("vue").DefineComponent<{
584
637
  onlyForwardCascade: boolean;
585
638
  hideLeaf: boolean;
586
639
  itemKey: (node: ITreeOption) => IKey;
640
+ showTagHover: boolean;
587
641
  }>;
588
642
  export default _default;
@@ -1,9 +1,9 @@
1
- import { defineComponent, inject, ref, shallowRef, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeStyle, createCommentVNode, renderSlot, withKeys, createTextVNode, toDisplayString, withDirectives, vShow, createElementBlock, mergeProps, Fragment, renderList } from 'vue';
2
- import { useMessage, NGrid, NGi, NInputGroup, NInput, NButton, NCheckbox, NTree, NSpace, NIcon } from 'naive-ui';
3
- import { CloseCircleSharp } from '@vicons/ionicons5';
1
+ import { defineComponent, inject, ref, shallowRef, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeStyle, createCommentVNode, renderSlot, withKeys, createTextVNode, toDisplayString, withDirectives, vShow, createElementBlock, mergeProps, Fragment, renderList, normalizeProps, guardReactiveProps } from 'vue';
2
+ import { useMessage, NGrid, NGi, NInputGroup, NInput, NButton, NCheckbox, NTree, NSpace, NPopover } from 'naive-ui';
4
3
  import { searchBasisTree } from './utils/index.js';
5
4
  import { union, remove } from 'lodash-es';
6
5
  import SearchGroupList from './components/SearchGroupList.vue.js';
6
+ import TagItem from './components/TagItem.vue.js';
7
7
  import DefaultPage from '../../default-page/index.js';
8
8
  import { InjectionSelectPersonEmits } from './constants/index.js';
9
9
 
@@ -20,6 +20,9 @@ const _hoisted_3 = {
20
20
  const _hoisted_4 = {
21
21
  class: "c-select-person__containerRight"
22
22
  };
23
+ const _hoisted_5 = {
24
+ class: "c-select-person__popover"
25
+ };
23
26
  var _sfc_main = /* @__PURE__ */ defineComponent({
24
27
  __name: "SelectPerson",
25
28
  props: {
@@ -112,6 +115,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
112
115
  itemKey: {
113
116
  type: Function,
114
117
  default: void 0
118
+ },
119
+ showTagHover: {
120
+ type: Boolean,
121
+ default: false
115
122
  }
116
123
  },
117
124
  setup(__props, {
@@ -258,6 +265,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
258
265
  user_expand_keys
259
266
  } = props.wordbookChild;
260
267
  let leafCount = 0;
268
+ let innerItems = [];
261
269
  const {
262
270
  label: parentLabel = "",
263
271
  parentName = "",
@@ -280,6 +288,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
280
288
  parentKey,
281
289
  parentName: parentLabel + (parentName ? parentLabel ? `/${parentName}` : parentName : ""),
282
290
  innerItemsNum: 0,
291
+ innerChildren: [],
283
292
  children: void 0,
284
293
  originItem: item,
285
294
  leaf: isLeaf,
@@ -295,7 +304,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
295
304
  return str ? acc ? `${acc}\uFF0C${str}` : str : acc;
296
305
  }, "");
297
306
  }
298
- !tree.disabled && leafCount++;
307
+ if (!tree.disabled) {
308
+ leafCount++;
309
+ innerItems.push(tree);
310
+ }
299
311
  } else {
300
312
  if (children == null ? void 0 : children.length) {
301
313
  const childData = transformData(children, tree, visitor);
@@ -303,7 +315,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
303
315
  tree.children = childData.treeItems;
304
316
  }
305
317
  tree.innerItemsNum += childData.leafCount;
318
+ tree.innerChildren = [...childData.innerItems, ...tree.innerChildren];
306
319
  leafCount += tree.innerItemsNum;
320
+ innerItems = [...innerItems, ...tree.innerChildren];
307
321
  }
308
322
  if (!empty_enable && tree.innerItemsNum == 0 && !isRemote.value)
309
323
  tree.disabled = true;
@@ -313,7 +327,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
313
327
  });
314
328
  return {
315
329
  treeItems,
316
- leafCount
330
+ leafCount,
331
+ innerItems
317
332
  };
318
333
  }
319
334
  async function onSearch() {
@@ -719,16 +734,36 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
719
734
  }())) : createCommentVNode("v-if", true)]),
720
735
  _: 1
721
736
  }), createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(caculateTagData), (tag) => {
722
- return openBlock(), createElementBlock("span", {
723
- class: "c-select-person__tag-item",
737
+ return openBlock(), createElementBlock(Fragment, {
724
738
  key: tag.key
725
- }, [createCommentVNode(" \u6807\u7B7E\u63D2\u69FD "), renderSlot(_ctx.$slots, "tag", {
726
- tag
727
- }, () => [createTextVNode(toDisplayString(tag.label) + " " + toDisplayString(tag.parentName ? `(${tag.parentName})` : "") + " " + toDisplayString(tag.innerItemsNum ? `(${tag.innerItemsNum}\u4EBA)` : ""), 1)]), createVNode(unref(NIcon), {
728
- class: "tag-close",
729
- component: unref(CloseCircleSharp),
730
- onClick: ($event) => updateChecked(tag.key, false)
731
- }, null, 8, ["component", "onClick"])]);
739
+ }, [__props.showTagHover && tag.innerItemsNum > 0 ? (openBlock(), createBlock(unref(NPopover), {
740
+ key: 0,
741
+ trigger: "hover"
742
+ }, {
743
+ trigger: withCtx(() => [createVNode(TagItem, {
744
+ tag,
745
+ onUnchecked: updateChecked
746
+ }, {
747
+ tag: withCtx((filterProps) => [renderSlot(_ctx.$slots, "tag", normalizeProps(guardReactiveProps(filterProps)))]),
748
+ _: 2
749
+ }, 1032, ["tag"])]),
750
+ default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(tag.innerChildren, (childTag) => {
751
+ return openBlock(), createBlock(TagItem, {
752
+ key: childTag.key,
753
+ tag: childTag,
754
+ showClose: false,
755
+ onUnchecked: updateChecked
756
+ }, null, 8, ["tag"]);
757
+ }), 128))])]),
758
+ _: 2
759
+ }, 1024)) : (openBlock(), createBlock(TagItem, {
760
+ key: 1,
761
+ tag,
762
+ onUnchecked: updateChecked
763
+ }, {
764
+ tag: withCtx((filterProps) => [renderSlot(_ctx.$slots, "tag", normalizeProps(guardReactiveProps(filterProps)))]),
765
+ _: 2
766
+ }, 1032, ["tag"]))], 64);
732
767
  }), 128))])], 4)]),
733
768
  _: 3
734
769
  })]),
@@ -0,0 +1,43 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ tag: {
5
+ type: PropType<AnyObject>;
6
+ required: true;
7
+ };
8
+ showClose: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ }, {
13
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
14
+ tag: {
15
+ type: PropType<AnyObject>;
16
+ required: true;
17
+ };
18
+ showClose: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ }>> & {
23
+ onUnchecked?: ((...args: any[]) => any) | undefined;
24
+ }>>;
25
+ emit: (event: "unchecked", ...args: any[]) => void;
26
+ updateChecked: (key: string, checked: boolean) => void;
27
+ NIcon: any;
28
+ CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
29
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
+ tag: {
31
+ type: PropType<AnyObject>;
32
+ required: true;
33
+ };
34
+ showClose: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ }>> & {
39
+ onUnchecked?: ((...args: any[]) => any) | undefined;
40
+ }, {
41
+ showClose: boolean;
42
+ }>;
43
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './TagItem.vue2.js';
2
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
3
+
4
+ var TagItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "TagItem.vue"]]);
5
+
6
+ export { TagItem as default };
@@ -0,0 +1,40 @@
1
+ import { defineComponent, openBlock, createElementBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, createBlock, unref } from 'vue';
2
+ import { NIcon } from 'naive-ui';
3
+ import { CloseCircleSharp } from '@vicons/ionicons5';
4
+
5
+ const _hoisted_1 = {
6
+ class: "c-select-person__tag-item"
7
+ };
8
+ var _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "TagItem",
10
+ props: {
11
+ tag: {
12
+ type: Object,
13
+ required: true
14
+ },
15
+ showClose: {
16
+ type: Boolean,
17
+ default: true
18
+ }
19
+ },
20
+ emits: ["unchecked"],
21
+ setup(__props, {
22
+ emit
23
+ }) {
24
+ const updateChecked = (key, checked) => {
25
+ emit("unchecked", key, checked);
26
+ };
27
+ return (_ctx, _cache) => {
28
+ return openBlock(), createElementBlock("div", _hoisted_1, [createCommentVNode(" \u6807\u7B7E\u63D2\u69FD "), renderSlot(_ctx.$slots, "tag", {
29
+ tag: __props.tag
30
+ }, () => [createTextVNode(toDisplayString(__props.tag.label) + " " + toDisplayString(__props.tag.parentName ? `(${__props.tag.parentName})` : "") + " " + toDisplayString(__props.tag.innerItemsNum ? `(${__props.tag.innerItemsNum}\u4EBA)` : ""), 1)]), __props.showClose ? (openBlock(), createBlock(unref(NIcon), {
31
+ key: 0,
32
+ class: "tag-close",
33
+ component: unref(CloseCircleSharp),
34
+ onClick: _cache[0] || (_cache[0] = ($event) => updateChecked(__props.tag.key, false))
35
+ }, null, 8, ["component"])) : createCommentVNode("v-if", true)]);
36
+ };
37
+ }
38
+ });
39
+
40
+ export { _sfc_main as default };
@@ -125,6 +125,10 @@ declare const _default: import("vue").DefineComponent<{
125
125
  type: PropType<(node: ITreeOption) => IKey>;
126
126
  default: undefined;
127
127
  };
128
+ showTagHover: {
129
+ type: BooleanConstructor;
130
+ default: boolean;
131
+ };
128
132
  }, {
129
133
  $attrs: {
130
134
  [x: string]: unknown;
@@ -235,6 +239,10 @@ declare const _default: import("vue").DefineComponent<{
235
239
  type: PropType<(node: ITreeOption) => IKey>;
236
240
  default: undefined;
237
241
  };
242
+ showTagHover: {
243
+ type: BooleanConstructor;
244
+ default: boolean;
245
+ };
238
246
  }>> & {
239
247
  onCheck?: ((...args: any[]) => any) | undefined;
240
248
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1345,6 +1353,10 @@ declare const _default: import("vue").DefineComponent<{
1345
1353
  type: PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject) => string | number>;
1346
1354
  default: undefined;
1347
1355
  };
1356
+ showTagHover: {
1357
+ type: BooleanConstructor;
1358
+ default: boolean;
1359
+ };
1348
1360
  }, {
1349
1361
  $message: import("naive-ui").MessageApi;
1350
1362
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1427,6 +1439,10 @@ declare const _default: import("vue").DefineComponent<{
1427
1439
  type: PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject) => string | number>;
1428
1440
  default: undefined;
1429
1441
  };
1442
+ showTagHover: {
1443
+ type: BooleanConstructor;
1444
+ default: boolean;
1445
+ };
1430
1446
  }>> & {}>>;
1431
1447
  emit: any;
1432
1448
  keyword: import("vue").Ref<string>;
@@ -1526,7 +1542,9 @@ declare const _default: import("vue").DefineComponent<{
1526
1542
  transformData: (trees: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[], parentNode: import("./types").PTreeOption | null, visitor?: Partial<Record<"enter" | "leave", (node: import("./types").PTreeOption) => unknown>> | undefined) => {
1527
1543
  treeItems: import("./types").PTreeOption[];
1528
1544
  leafCount: number;
1545
+ innerItems: any[];
1529
1546
  };
1547
+ getTreeOptionChildren: (item: import("./types").PTreeOption) => void;
1530
1548
  onSearch: () => Promise<void>;
1531
1549
  getAllKeys: (tree: import("./types").PTreeOption[], strategy: import("./types").Strategy) => (string | number)[];
1532
1550
  getParentKeys: (node: import("./types").PTreeOption, map: Map<string | number, import("./types").PTreeOption>) => never[];
@@ -1562,11 +1580,10 @@ declare const _default: import("vue").DefineComponent<{
1562
1580
  NInputGroup: any;
1563
1581
  NCheckbox: any;
1564
1582
  NTree: any;
1565
- NIcon: any;
1566
1583
  NSpace: any;
1567
1584
  NGrid: any;
1568
1585
  NGi: any;
1569
- CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1586
+ NPopover: any;
1570
1587
  SearchGroupList: import("vue").DefineComponent<{
1571
1588
  data: {
1572
1589
  type: PropType<{
@@ -1696,6 +1713,46 @@ declare const _default: import("vue").DefineComponent<{
1696
1713
  }, {
1697
1714
  type: string;
1698
1715
  }>;
1716
+ TagItem: import("vue").DefineComponent<{
1717
+ tag: {
1718
+ type: PropType<AnyObject>;
1719
+ required: true;
1720
+ };
1721
+ showClose: {
1722
+ type: BooleanConstructor;
1723
+ default: boolean;
1724
+ };
1725
+ }, {
1726
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1727
+ tag: {
1728
+ type: PropType<AnyObject>;
1729
+ required: true;
1730
+ };
1731
+ showClose: {
1732
+ type: BooleanConstructor;
1733
+ default: boolean;
1734
+ };
1735
+ }>> & {
1736
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1737
+ }>>;
1738
+ emit: (event: "unchecked", ...args: any[]) => void;
1739
+ updateChecked: (key: string, checked: boolean) => void;
1740
+ NIcon: any;
1741
+ CloseCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1742
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1743
+ tag: {
1744
+ type: PropType<AnyObject>;
1745
+ required: true;
1746
+ };
1747
+ showClose: {
1748
+ type: BooleanConstructor;
1749
+ default: boolean;
1750
+ };
1751
+ }>> & {
1752
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1753
+ }, {
1754
+ showClose: boolean;
1755
+ }>;
1699
1756
  CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1700
1757
  type: {
1701
1758
  type: StringConstructor;
@@ -1831,6 +1888,10 @@ declare const _default: import("vue").DefineComponent<{
1831
1888
  type: PropType<(node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject) => string | number>;
1832
1889
  default: undefined;
1833
1890
  };
1891
+ showTagHover: {
1892
+ type: BooleanConstructor;
1893
+ default: boolean;
1894
+ };
1834
1895
  }>>, {
1835
1896
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[];
1836
1897
  defaultList: ((string | number) | {
@@ -1853,6 +1914,7 @@ declare const _default: import("vue").DefineComponent<{
1853
1914
  onlyForwardCascade: boolean;
1854
1915
  hideLeaf: boolean;
1855
1916
  itemKey: (node: import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject) => string | number;
1917
+ showTagHover: boolean;
1856
1918
  }>>;
1857
1919
  getProps: import("vue").ComputedRef<Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1858
1920
  defaultList: {
@@ -1960,6 +2022,10 @@ declare const _default: import("vue").DefineComponent<{
1960
2022
  type: PropType<(node: ITreeOption) => IKey>;
1961
2023
  default: undefined;
1962
2024
  };
2025
+ showTagHover: {
2026
+ type: BooleanConstructor;
2027
+ default: boolean;
2028
+ };
1963
2029
  }>> & {
1964
2030
  onCheck?: ((...args: any[]) => any) | undefined;
1965
2031
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -2074,6 +2140,10 @@ declare const _default: import("vue").DefineComponent<{
2074
2140
  type: PropType<(node: ITreeOption) => IKey>;
2075
2141
  default: undefined;
2076
2142
  };
2143
+ showTagHover: {
2144
+ type: BooleanConstructor;
2145
+ default: boolean;
2146
+ };
2077
2147
  }>> & {
2078
2148
  onCheck?: ((...args: any[]) => any) | undefined;
2079
2149
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -2103,5 +2173,6 @@ declare const _default: import("vue").DefineComponent<{
2103
2173
  onlyForwardCascade: boolean;
2104
2174
  hideLeaf: boolean;
2105
2175
  itemKey: (node: ITreeOption) => IKey;
2176
+ showTagHover: boolean;
2106
2177
  }>;
2107
2178
  export default _default;
@@ -125,6 +125,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
125
125
  itemKey: {
126
126
  type: Function,
127
127
  default: void 0
128
+ },
129
+ showTagHover: {
130
+ type: Boolean,
131
+ default: false
128
132
  }
129
133
  },
130
134
  emits: [