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

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.
@@ -1968,12 +1968,11 @@ declare const _default: import("vue").DefineComponent<{
1968
1968
  renderLabel: ({ option }: {
1969
1969
  option: import("naive-ui").TreeOption;
1970
1970
  }) => JSX.Element;
1971
+ getChildren: (tag: import("../../select-person/src/types").PTreeOption) => AnyObject[];
1971
1972
  transformData: (trees: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[], parentNode: import("../../select-person/src/types").PTreeOption | null, visitor?: Partial<Record<"enter" | "leave", (node: import("../../select-person/src/types").PTreeOption) => unknown>> | undefined) => {
1972
1973
  treeItems: import("../../select-person/src/types").PTreeOption[];
1973
1974
  leafCount: number;
1974
- innerItems: any[];
1975
1975
  };
1976
- getTreeOptionChildren: (item: import("../../select-person/src/types").PTreeOption) => void;
1977
1976
  onSearch: () => Promise<void>;
1978
1977
  getAllKeys: (tree: import("../../select-person/src/types").PTreeOption[], strategy: import("../../select-person/src/types").Strategy) => (string | number)[];
1979
1978
  getParentKeys: (node: import("../../select-person/src/types").PTreeOption, map: Map<string | number, import("../../select-person/src/types").PTreeOption>) => never[];
@@ -2026,6 +2025,14 @@ declare const _default: import("vue").DefineComponent<{
2026
2025
  }[]>;
2027
2026
  required: true;
2028
2027
  };
2028
+ getChildren: {
2029
+ type: FunctionConstructor;
2030
+ required: true;
2031
+ };
2032
+ showTagHover: {
2033
+ type: BooleanConstructor;
2034
+ default: boolean;
2035
+ };
2029
2036
  type: {
2030
2037
  type: StringConstructor;
2031
2038
  default: string;
@@ -2045,6 +2052,14 @@ declare const _default: import("vue").DefineComponent<{
2045
2052
  }[]>;
2046
2053
  required: true;
2047
2054
  };
2055
+ getChildren: {
2056
+ type: FunctionConstructor;
2057
+ required: true;
2058
+ };
2059
+ showTagHover: {
2060
+ type: BooleanConstructor;
2061
+ default: boolean;
2062
+ };
2048
2063
  type: {
2049
2064
  type: StringConstructor;
2050
2065
  default: string;
@@ -2065,6 +2080,7 @@ declare const _default: import("vue").DefineComponent<{
2065
2080
  handleChange: (item: AnyObject, checked: boolean) => void;
2066
2081
  NVirtualList: any;
2067
2082
  NCheckbox: any;
2083
+ NPopover: any;
2068
2084
  CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
2069
2085
  type: {
2070
2086
  type: StringConstructor;
@@ -2120,6 +2136,62 @@ declare const _default: import("vue").DefineComponent<{
2120
2136
  type: string;
2121
2137
  config: AnyObject;
2122
2138
  }>>;
2139
+ GroupItem: import("vue").DefineComponent<{
2140
+ item: {
2141
+ type: PropType<AnyObject>;
2142
+ required: true;
2143
+ };
2144
+ }, {
2145
+ emit: (event: "checked", ...args: any[]) => void;
2146
+ handleClick: (item: AnyObject) => void;
2147
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2148
+ item: {
2149
+ type: PropType<AnyObject>;
2150
+ required: true;
2151
+ };
2152
+ }>> & {
2153
+ onChecked?: ((...args: any[]) => any) | undefined;
2154
+ }, {}>;
2155
+ TagItem: import("vue").DefineComponent<{
2156
+ tag: {
2157
+ type: PropType<AnyObject>;
2158
+ required: true;
2159
+ };
2160
+ showClose: {
2161
+ type: BooleanConstructor;
2162
+ default: boolean;
2163
+ };
2164
+ }, {
2165
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
2166
+ tag: {
2167
+ type: PropType<AnyObject>;
2168
+ required: true;
2169
+ };
2170
+ showClose: {
2171
+ type: BooleanConstructor;
2172
+ default: boolean;
2173
+ };
2174
+ }>> & {
2175
+ onUnchecked?: ((...args: any[]) => any) | undefined;
2176
+ }>>;
2177
+ emit: (event: "unchecked", ...args: any[]) => void;
2178
+ updateChecked: (key: string, checked: boolean) => void;
2179
+ NIcon: any;
2180
+ 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<{}>>, {}>;
2181
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2182
+ tag: {
2183
+ type: PropType<AnyObject>;
2184
+ required: true;
2185
+ };
2186
+ showClose: {
2187
+ type: BooleanConstructor;
2188
+ default: boolean;
2189
+ };
2190
+ }>> & {
2191
+ onUnchecked?: ((...args: any[]) => any) | undefined;
2192
+ }, {
2193
+ showClose: boolean;
2194
+ }>;
2123
2195
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2124
2196
  data: {
2125
2197
  type: PropType<{
@@ -2133,6 +2205,14 @@ declare const _default: import("vue").DefineComponent<{
2133
2205
  }[]>;
2134
2206
  required: true;
2135
2207
  };
2208
+ getChildren: {
2209
+ type: FunctionConstructor;
2210
+ required: true;
2211
+ };
2212
+ showTagHover: {
2213
+ type: BooleanConstructor;
2214
+ default: boolean;
2215
+ };
2136
2216
  type: {
2137
2217
  type: StringConstructor;
2138
2218
  default: string;
@@ -2141,6 +2221,7 @@ declare const _default: import("vue").DefineComponent<{
2141
2221
  onChecked?: ((...args: any[]) => any) | undefined;
2142
2222
  }, {
2143
2223
  type: string;
2224
+ showTagHover: boolean;
2144
2225
  }>;
2145
2226
  TagItem: import("vue").DefineComponent<{
2146
2227
  tag: {
@@ -2475,7 +2556,7 @@ declare const _default: import("vue").DefineComponent<{
2475
2556
  [x: string]: unknown;
2476
2557
  }>;
2477
2558
  emits: (event: "check" | "checkWithLevel", ...args: any[]) => void;
2478
- getCheckWithLevel: () => any;
2559
+ getCheckWithLevel: (strategy?: import("../../select-person/src/types").Strategy | undefined, hideLeaf?: boolean | undefined) => any;
2479
2560
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2480
2561
  defaultList: {
2481
2562
  type: PropType<((string | number) | {
@@ -1545,12 +1545,11 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1545
1545
  renderLabel: ({ option }: {
1546
1546
  option: import("naive-ui").TreeOption;
1547
1547
  }) => JSX.Element;
1548
+ getChildren: (tag: import("./src/types").PTreeOption) => import("../../shared/types").AnyObject[];
1548
1549
  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) => {
1549
1550
  treeItems: import("./src/types").PTreeOption[];
1550
1551
  leafCount: number;
1551
- innerItems: any[];
1552
1552
  };
1553
- getTreeOptionChildren: (item: import("./src/types").PTreeOption) => void;
1554
1553
  onSearch: () => Promise<void>;
1555
1554
  getAllKeys: (tree: import("./src/types").PTreeOption[], strategy: import("./src/types").Strategy) => (string | number)[];
1556
1555
  getParentKeys: (node: import("./src/types").PTreeOption, map: Map<string | number, import("./src/types").PTreeOption>) => never[];
@@ -1603,6 +1602,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1603
1602
  }[]>;
1604
1603
  required: true;
1605
1604
  };
1605
+ getChildren: {
1606
+ type: FunctionConstructor;
1607
+ required: true;
1608
+ };
1609
+ showTagHover: {
1610
+ type: BooleanConstructor;
1611
+ default: boolean;
1612
+ };
1606
1613
  type: {
1607
1614
  type: StringConstructor;
1608
1615
  default: string;
@@ -1622,6 +1629,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1622
1629
  }[]>;
1623
1630
  required: true;
1624
1631
  };
1632
+ getChildren: {
1633
+ type: FunctionConstructor;
1634
+ required: true;
1635
+ };
1636
+ showTagHover: {
1637
+ type: BooleanConstructor;
1638
+ default: boolean;
1639
+ };
1625
1640
  type: {
1626
1641
  type: StringConstructor;
1627
1642
  default: string;
@@ -1642,6 +1657,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1642
1657
  handleChange: (item: import("../../shared/types").AnyObject, checked: boolean) => void;
1643
1658
  NVirtualList: any;
1644
1659
  NCheckbox: any;
1660
+ NPopover: any;
1645
1661
  CDefaultPage: SFCWithInstall<import("vue").DefineComponent<{
1646
1662
  type: {
1647
1663
  type: StringConstructor;
@@ -1697,6 +1713,62 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1697
1713
  type: string;
1698
1714
  config: import("../../shared/types").AnyObject;
1699
1715
  }>>;
1716
+ GroupItem: import("vue").DefineComponent<{
1717
+ item: {
1718
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1719
+ required: true;
1720
+ };
1721
+ }, {
1722
+ emit: (event: "checked", ...args: any[]) => void;
1723
+ handleClick: (item: import("../../shared/types").AnyObject) => void;
1724
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1725
+ item: {
1726
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1727
+ required: true;
1728
+ };
1729
+ }>> & {
1730
+ onChecked?: ((...args: any[]) => any) | undefined;
1731
+ }, {}>;
1732
+ TagItem: import("vue").DefineComponent<{
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
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1743
+ tag: {
1744
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1745
+ required: true;
1746
+ };
1747
+ showClose: {
1748
+ type: BooleanConstructor;
1749
+ default: boolean;
1750
+ };
1751
+ }>> & {
1752
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1753
+ }>>;
1754
+ emit: (event: "unchecked", ...args: any[]) => void;
1755
+ updateChecked: (key: string, checked: boolean) => void;
1756
+ NIcon: any;
1757
+ 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<{}>>, {}>;
1758
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1759
+ tag: {
1760
+ type: import("vue").PropType<import("../../shared/types").AnyObject>;
1761
+ required: true;
1762
+ };
1763
+ showClose: {
1764
+ type: BooleanConstructor;
1765
+ default: boolean;
1766
+ };
1767
+ }>> & {
1768
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1769
+ }, {
1770
+ showClose: boolean;
1771
+ }>;
1700
1772
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1701
1773
  data: {
1702
1774
  type: import("vue").PropType<{
@@ -1710,6 +1782,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1710
1782
  }[]>;
1711
1783
  required: true;
1712
1784
  };
1785
+ getChildren: {
1786
+ type: FunctionConstructor;
1787
+ required: true;
1788
+ };
1789
+ showTagHover: {
1790
+ type: BooleanConstructor;
1791
+ default: boolean;
1792
+ };
1713
1793
  type: {
1714
1794
  type: StringConstructor;
1715
1795
  default: string;
@@ -1718,6 +1798,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
1718
1798
  onChecked?: ((...args: any[]) => any) | undefined;
1719
1799
  }, {
1720
1800
  type: string;
1801
+ showTagHover: boolean;
1721
1802
  }>;
1722
1803
  TagItem: import("vue").DefineComponent<{
1723
1804
  tag: {
@@ -2052,7 +2133,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
2052
2133
  [x: string]: unknown;
2053
2134
  }>;
2054
2135
  emits: (event: "check" | "checkWithLevel", ...args: any[]) => void;
2055
- getCheckWithLevel: () => any;
2136
+ getCheckWithLevel: (strategy?: import("./src/types").Strategy | undefined, hideLeaf?: boolean | undefined) => any;
2056
2137
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2057
2138
  defaultList: {
2058
2139
  type: import("vue").PropType<((string | number) | {
@@ -268,12 +268,11 @@ declare const _default: import("vue").DefineComponent<{
268
268
  renderLabel: ({ option }: {
269
269
  option: TreeOption;
270
270
  }) => JSX.Element;
271
+ getChildren: (tag: PTreeOption) => AnyObject[];
271
272
  transformData: (trees: ITreeOption[], parentNode: PTreeOption | null, visitor?: Partial<Record<"enter" | "leave", (node: PTreeOption) => unknown>> | undefined) => {
272
273
  treeItems: PTreeOption[];
273
274
  leafCount: number;
274
- innerItems: any[];
275
275
  };
276
- getTreeOptionChildren: (item: PTreeOption) => void;
277
276
  onSearch: () => Promise<void>;
278
277
  getAllKeys: (tree: PTreeOption[], strategy: Strategy) => IKey[];
279
278
  getParentKeys: (node: PTreeOption, map: Map<IKey, PTreeOption>) => never[];
@@ -326,6 +325,14 @@ declare const _default: import("vue").DefineComponent<{
326
325
  }[]>;
327
326
  required: true;
328
327
  };
328
+ getChildren: {
329
+ type: FunctionConstructor;
330
+ required: true;
331
+ };
332
+ showTagHover: {
333
+ type: BooleanConstructor;
334
+ default: boolean;
335
+ };
329
336
  type: {
330
337
  type: StringConstructor;
331
338
  default: string;
@@ -345,6 +352,14 @@ declare const _default: import("vue").DefineComponent<{
345
352
  }[]>;
346
353
  required: true;
347
354
  };
355
+ getChildren: {
356
+ type: FunctionConstructor;
357
+ required: true;
358
+ };
359
+ showTagHover: {
360
+ type: BooleanConstructor;
361
+ default: boolean;
362
+ };
348
363
  type: {
349
364
  type: StringConstructor;
350
365
  default: string;
@@ -365,6 +380,7 @@ declare const _default: import("vue").DefineComponent<{
365
380
  handleChange: (item: AnyObject, checked: boolean) => void;
366
381
  NVirtualList: any;
367
382
  NCheckbox: any;
383
+ NPopover: any;
368
384
  CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
369
385
  type: {
370
386
  type: StringConstructor;
@@ -420,6 +436,62 @@ declare const _default: import("vue").DefineComponent<{
420
436
  type: string;
421
437
  config: AnyObject;
422
438
  }>>;
439
+ GroupItem: import("vue").DefineComponent<{
440
+ item: {
441
+ type: PropType<AnyObject>;
442
+ required: true;
443
+ };
444
+ }, {
445
+ emit: (event: "checked", ...args: any[]) => void;
446
+ handleClick: (item: AnyObject) => void;
447
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
448
+ item: {
449
+ type: PropType<AnyObject>;
450
+ required: true;
451
+ };
452
+ }>> & {
453
+ onChecked?: ((...args: any[]) => any) | undefined;
454
+ }, {}>;
455
+ TagItem: import("vue").DefineComponent<{
456
+ tag: {
457
+ type: PropType<AnyObject>;
458
+ required: true;
459
+ };
460
+ showClose: {
461
+ type: BooleanConstructor;
462
+ default: boolean;
463
+ };
464
+ }, {
465
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
466
+ tag: {
467
+ type: PropType<AnyObject>;
468
+ required: true;
469
+ };
470
+ showClose: {
471
+ type: BooleanConstructor;
472
+ default: boolean;
473
+ };
474
+ }>> & {
475
+ onUnchecked?: ((...args: any[]) => any) | undefined;
476
+ }>>;
477
+ emit: (event: "unchecked", ...args: any[]) => void;
478
+ updateChecked: (key: string, checked: boolean) => void;
479
+ NIcon: any;
480
+ 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<{}>>, {}>;
481
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
482
+ tag: {
483
+ type: PropType<AnyObject>;
484
+ required: true;
485
+ };
486
+ showClose: {
487
+ type: BooleanConstructor;
488
+ default: boolean;
489
+ };
490
+ }>> & {
491
+ onUnchecked?: ((...args: any[]) => any) | undefined;
492
+ }, {
493
+ showClose: boolean;
494
+ }>;
423
495
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
424
496
  data: {
425
497
  type: PropType<{
@@ -433,6 +505,14 @@ declare const _default: import("vue").DefineComponent<{
433
505
  }[]>;
434
506
  required: true;
435
507
  };
508
+ getChildren: {
509
+ type: FunctionConstructor;
510
+ required: true;
511
+ };
512
+ showTagHover: {
513
+ type: BooleanConstructor;
514
+ default: boolean;
515
+ };
436
516
  type: {
437
517
  type: StringConstructor;
438
518
  default: string;
@@ -441,6 +521,7 @@ declare const _default: import("vue").DefineComponent<{
441
521
  onChecked?: ((...args: any[]) => any) | undefined;
442
522
  }, {
443
523
  type: string;
524
+ showTagHover: boolean;
444
525
  }>;
445
526
  TagItem: import("vue").DefineComponent<{
446
527
  tag: {
@@ -1,6 +1,6 @@
1
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
2
  import { useMessage, NGrid, NGi, NInputGroup, NInput, NButton, NCheckbox, NTree, NSpace, NPopover } from 'naive-ui';
3
- import { searchBasisTree } from './utils/index.js';
3
+ import { getAllChildren, searchBasisTree } from './utils/index.js';
4
4
  import { union, remove } from 'lodash-es';
5
5
  import SearchGroupList from './components/SearchGroupList.vue.js';
6
6
  import TagItem from './components/TagItem.vue.js';
@@ -249,6 +249,25 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
249
249
  }, [labelExpand])]);
250
250
  }
251
251
  }
252
+ function getChildren(tag) {
253
+ var _a;
254
+ const {
255
+ children: childrenKey = "children"
256
+ } = props.wordbook;
257
+ if (!tag || !(tag == null ? void 0 : tag.originItem) || !((_a = tag == null ? void 0 : tag.originItem[childrenKey]) == null ? void 0 : _a.length))
258
+ return [];
259
+ const {
260
+ itemKey,
261
+ hideLeaf
262
+ } = props;
263
+ const tempData = transformData(tag.originItem[childrenKey], tag, {
264
+ enter(node) {
265
+ node.key = itemKey ? itemKey(node.originItem) : node.key;
266
+ treeMap.set(node.key, node);
267
+ }
268
+ });
269
+ return getAllChildren(tempData.treeItems, childrenKey);
270
+ }
252
271
  function transformData(trees, parentNode, visitor) {
253
272
  const {
254
273
  children: childrenKey = "children",
@@ -265,7 +284,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
265
284
  user_expand_keys
266
285
  } = props.wordbookChild;
267
286
  let leafCount = 0;
268
- let innerItems = [];
269
287
  const {
270
288
  label: parentLabel = "",
271
289
  parentName = "",
@@ -288,7 +306,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
288
306
  parentKey,
289
307
  parentName: parentLabel + (parentName ? parentLabel ? `/${parentName}` : parentName : ""),
290
308
  innerItemsNum: 0,
291
- innerChildren: [],
292
309
  children: void 0,
293
310
  originItem: item,
294
311
  leaf: isLeaf,
@@ -306,7 +323,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
306
323
  }
307
324
  if (!tree.disabled) {
308
325
  leafCount++;
309
- innerItems.push(tree);
310
326
  }
311
327
  } else {
312
328
  if (children == null ? void 0 : children.length) {
@@ -315,9 +331,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
315
331
  tree.children = childData.treeItems;
316
332
  }
317
333
  tree.innerItemsNum += childData.leafCount;
318
- tree.innerChildren = [...childData.innerItems, ...tree.innerChildren];
319
334
  leafCount += tree.innerItemsNum;
320
- innerItems = [...innerItems, ...tree.innerChildren];
321
335
  }
322
336
  if (!empty_enable && tree.innerItemsNum == 0 && !isRemote.value)
323
337
  tree.disabled = true;
@@ -327,8 +341,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
327
341
  });
328
342
  return {
329
343
  treeItems,
330
- leafCount,
331
- innerItems
344
+ leafCount
332
345
  };
333
346
  }
334
347
  async function onSearch() {
@@ -353,10 +366,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
353
366
  const originItem = node.originItem;
354
367
  const match = label.includes(kw) || labelExpand.includes(kw) || originItem && originItem[filterKey] && String(originItem[filterKey]).includes(kw);
355
368
  if (match) {
356
- result.push({
357
- ...node,
358
- children: void 0
359
- });
369
+ result.push(node);
360
370
  }
361
371
  if (node.children && node.children.length > 0) {
362
372
  stack.push(...node.children);
@@ -673,8 +683,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
673
683
  class: "c-select-person__hide",
674
684
  type: unref(showType),
675
685
  data: unref(searchData),
686
+ showTagHover: __props.showTagHover,
687
+ getChildren,
676
688
  onChecked: notifyCheck
677
- }, null, 8, ["type", "data"])) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(NTree), mergeProps({
689
+ }, null, 8, ["type", "data", "showTagHover"])) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(NTree), mergeProps({
678
690
  "expanded-keys": expandedKeys.value,
679
691
  "onUpdate:expanded-keys": _cache[2] || (_cache[2] = ($event) => expandedKeys.value = $event),
680
692
  "selected-keys": checkedKeys.value,
@@ -747,12 +759,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
747
759
  tag: withCtx((filterProps) => [renderSlot(_ctx.$slots, "tag", normalizeProps(guardReactiveProps(filterProps)))]),
748
760
  _: 2
749
761
  }, 1032, ["tag"])]),
750
- default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(tag.innerChildren, (childTag) => {
762
+ default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(getChildren(tag), (childTag) => {
751
763
  return openBlock(), createBlock(TagItem, {
752
764
  key: childTag.key,
753
765
  tag: childTag,
754
- showClose: false,
755
- onUnchecked: updateChecked
766
+ showClose: false
756
767
  }, null, 8, ["tag"]);
757
768
  }), 128))])]),
758
769
  _: 2
@@ -0,0 +1,19 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ item: {
5
+ type: PropType<AnyObject>;
6
+ required: true;
7
+ };
8
+ }, {
9
+ emit: (event: "checked", ...args: any[]) => void;
10
+ handleClick: (item: AnyObject) => void;
11
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
+ item: {
13
+ type: PropType<AnyObject>;
14
+ required: true;
15
+ };
16
+ }>> & {
17
+ onChecked?: ((...args: any[]) => any) | undefined;
18
+ }, {}>;
19
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './GroupItem.vue2.js';
2
+ import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.js';
3
+
4
+ var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "GroupItem.vue"]]);
5
+
6
+ export { GroupItem as default };
@@ -0,0 +1,37 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString } from 'vue';
2
+
3
+ const _hoisted_1 = ["title"];
4
+ const _hoisted_2 = {
5
+ class: "font-12 ml-4"
6
+ };
7
+ const _hoisted_3 = {
8
+ class: "c-select-person__searchGroupItemDesc c-select-person__ellipsis"
9
+ };
10
+ var _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "GroupItem",
12
+ props: {
13
+ item: {
14
+ type: Object,
15
+ required: true
16
+ }
17
+ },
18
+ emits: ["checked"],
19
+ setup(__props, {
20
+ emit
21
+ }) {
22
+ function handleClick(item) {
23
+ emit("checked", item);
24
+ }
25
+ return (_ctx, _cache) => {
26
+ return openBlock(), createElementBlock("div", {
27
+ class: "c-select-person__searchGroupItemCell",
28
+ onClick: _cache[0] || (_cache[0] = ($event) => handleClick(__props.item))
29
+ }, [createElementVNode("div", {
30
+ class: "c-select-person__ellipsis",
31
+ title: __props.item.label
32
+ }, [createTextVNode(toDisplayString(__props.item.label) + " " + toDisplayString(__props.item.innerItemsNum ? `(${__props.item.innerItemsNum}\u4EBA)` : "") + " ", 1), createElementVNode("span", _hoisted_2, toDisplayString(__props.item.labelExpand), 1)], 8, _hoisted_1), createElementVNode("div", _hoisted_3, toDisplayString(__props.item.parentName), 1)]);
33
+ };
34
+ }
35
+ });
36
+
37
+ export { _sfc_main as default };