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

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 (24) hide show
  1. package/es/components/expand-field/index.d.ts +86 -3
  2. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +86 -3
  3. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +86 -3
  4. package/es/components/expand-field/src/components/form.vue.d.ts +86 -3
  5. package/es/components/expand-field/src/index.vue.d.ts +86 -3
  6. package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
  7. package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -4
  8. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
  9. package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
  10. package/es/components/select-person/index.d.ts +86 -3
  11. package/es/components/select-person/src/SelectPerson.vue.d.ts +85 -2
  12. package/es/components/select-person/src/SelectPerson.vue2.js +19 -16
  13. package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
  14. package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
  15. package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
  16. package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +87 -0
  17. package/es/components/select-person/src/components/SearchGroupList.vue2.js +44 -5
  18. package/es/components/select-person/src/index.vue.d.ts +89 -5
  19. package/es/components/select-person/src/index.vue2.js +2 -2
  20. package/es/components/select-person/src/utils/index.d.ts +2 -0
  21. package/es/components/select-person/src/utils/index.js +24 -1
  22. package/es/shared/package.json.js +1 -1
  23. package/package.json +2 -2
  24. package/es/components/select-person/src/SelectPersonTest.vue.d.ts +0 -555
@@ -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 };
@@ -1,5 +1,8 @@
1
1
  import { PropType } from 'vue';
2
+ import { type TreeOption } from 'naive-ui';
2
3
  import { AnyObject } from '../../../../shared/types';
4
+ import { PTreeOption, IWordBook } from '../types';
5
+ type ITreeOption = TreeOption & AnyObject;
3
6
  declare const _default: import("vue").DefineComponent<{
4
7
  data: {
5
8
  type: PropType<{
@@ -13,6 +16,14 @@ declare const _default: import("vue").DefineComponent<{
13
16
  }[]>;
14
17
  required: true;
15
18
  };
19
+ wordbook: {
20
+ type: PropType<IWordBook<ITreeOption>>;
21
+ default: () => {};
22
+ };
23
+ showTagHover: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
16
27
  type: {
17
28
  type: StringConstructor;
18
29
  default: string;
@@ -32,6 +43,14 @@ declare const _default: import("vue").DefineComponent<{
32
43
  }[]>;
33
44
  required: true;
34
45
  };
46
+ wordbook: {
47
+ type: PropType<IWordBook<ITreeOption>>;
48
+ default: () => {};
49
+ };
50
+ showTagHover: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
35
54
  type: {
36
55
  type: StringConstructor;
37
56
  default: string;
@@ -48,10 +67,12 @@ declare const _default: import("vue").DefineComponent<{
48
67
  parentName: string;
49
68
  }[];
50
69
  }[]>;
70
+ getChildren: (tag: PTreeOption) => AnyObject[];
51
71
  handleClick: (item: AnyObject) => void;
52
72
  handleChange: (item: AnyObject, checked: boolean) => void;
53
73
  NVirtualList: any;
54
74
  NCheckbox: any;
75
+ NPopover: any;
55
76
  CDefaultPage: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
56
77
  type: {
57
78
  type: StringConstructor;
@@ -107,6 +128,62 @@ declare const _default: import("vue").DefineComponent<{
107
128
  type: string;
108
129
  config: AnyObject;
109
130
  }>>;
131
+ GroupItem: import("vue").DefineComponent<{
132
+ item: {
133
+ type: PropType<AnyObject>;
134
+ required: true;
135
+ };
136
+ }, {
137
+ emit: (event: "checked", ...args: any[]) => void;
138
+ handleClick: (item: AnyObject) => void;
139
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
140
+ item: {
141
+ type: PropType<AnyObject>;
142
+ required: true;
143
+ };
144
+ }>> & {
145
+ onChecked?: ((...args: any[]) => any) | undefined;
146
+ }, {}>;
147
+ TagItem: import("vue").DefineComponent<{
148
+ tag: {
149
+ type: PropType<AnyObject>;
150
+ required: true;
151
+ };
152
+ showClose: {
153
+ type: BooleanConstructor;
154
+ default: boolean;
155
+ };
156
+ }, {
157
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
158
+ tag: {
159
+ type: PropType<AnyObject>;
160
+ required: true;
161
+ };
162
+ showClose: {
163
+ type: BooleanConstructor;
164
+ default: boolean;
165
+ };
166
+ }>> & {
167
+ onUnchecked?: ((...args: any[]) => any) | undefined;
168
+ }>>;
169
+ emit: (event: "unchecked", ...args: any[]) => void;
170
+ updateChecked: (key: string, checked: boolean) => void;
171
+ NIcon: any;
172
+ 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<{}>>, {}>;
173
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
174
+ tag: {
175
+ type: PropType<AnyObject>;
176
+ required: true;
177
+ };
178
+ showClose: {
179
+ type: BooleanConstructor;
180
+ default: boolean;
181
+ };
182
+ }>> & {
183
+ onUnchecked?: ((...args: any[]) => any) | undefined;
184
+ }, {
185
+ showClose: boolean;
186
+ }>;
110
187
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
111
188
  data: {
112
189
  type: PropType<{
@@ -120,6 +197,14 @@ declare const _default: import("vue").DefineComponent<{
120
197
  }[]>;
121
198
  required: true;
122
199
  };
200
+ wordbook: {
201
+ type: PropType<IWordBook<ITreeOption>>;
202
+ default: () => {};
203
+ };
204
+ showTagHover: {
205
+ type: BooleanConstructor;
206
+ default: boolean;
207
+ };
123
208
  type: {
124
209
  type: StringConstructor;
125
210
  default: string;
@@ -128,5 +213,7 @@ declare const _default: import("vue").DefineComponent<{
128
213
  onChecked?: ((...args: any[]) => any) | undefined;
129
214
  }, {
130
215
  type: string;
216
+ wordbook: IWordBook<ITreeOption>;
217
+ showTagHover: boolean;
131
218
  }>;
132
219
  export default _default;
@@ -1,6 +1,9 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, unref, normalizeStyle, createCommentVNode, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createBlock } from 'vue';
2
- import { NVirtualList, NCheckbox } from 'naive-ui';
2
+ import { NVirtualList, NCheckbox, NPopover } from 'naive-ui';
3
3
  import DefaultPage from '../../../default-page/index.js';
4
+ import GroupItem from './GroupItem.vue.js';
5
+ import TagItem from './TagItem.vue.js';
6
+ import { getAllChildren } from '../utils/index.js';
4
7
 
5
8
  const _hoisted_1 = {
6
9
  class: "c-select-person__searchGroup"
@@ -18,9 +21,12 @@ const _hoisted_5 = {
18
21
  const _hoisted_6 = ["onClick"];
19
22
  const _hoisted_7 = ["title"];
20
23
  const _hoisted_8 = {
21
- class: "font-12 ml-4"
24
+ class: "c-select-person__popover"
22
25
  };
23
26
  const _hoisted_9 = {
27
+ class: "font-12 ml-4"
28
+ };
29
+ const _hoisted_10 = {
24
30
  class: "c-select-person__searchGroupItemDesc c-select-person__ellipsis"
25
31
  };
26
32
  var _sfc_main = /* @__PURE__ */ defineComponent({
@@ -30,6 +36,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
30
36
  type: Array,
31
37
  required: true
32
38
  },
39
+ wordbook: {
40
+ type: Object,
41
+ default: () => ({})
42
+ },
43
+ showTagHover: {
44
+ type: Boolean,
45
+ default: false
46
+ },
33
47
  type: {
34
48
  type: String,
35
49
  default: ""
@@ -47,6 +61,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
47
61
  }
48
62
  return props.data;
49
63
  });
64
+ function getChildren(tag) {
65
+ var _a;
66
+ const {
67
+ children: childrenKey = "children"
68
+ } = props.wordbook;
69
+ if (!tag || !((_a = tag[childrenKey]) == null ? void 0 : _a.length))
70
+ return [];
71
+ return getAllChildren(tag, childrenKey);
72
+ }
50
73
  function handleClick(item) {
51
74
  emit("checked", item.key, true);
52
75
  }
@@ -95,14 +118,30 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
95
118
  }, {
96
119
  default: withCtx(({
97
120
  item
98
- }) => [(openBlock(), createElementBlock("div", {
99
- key: item.key,
121
+ }) => [__props.showTagHover && item.innerItemsNum > 0 ? (openBlock(), createElementBlock("div", {
122
+ key: 0,
100
123
  class: "c-select-person__searchGroupItemCell",
101
124
  onClick: ($event) => handleClick(item)
102
125
  }, [createElementVNode("div", {
103
126
  class: "c-select-person__ellipsis",
104
127
  title: item.label
105
- }, [createTextVNode(toDisplayString(item.label) + " " + toDisplayString(item.innerItemsNum ? `(${item.innerItemsNum}\u4EBA)` : "") + " ", 1), createElementVNode("span", _hoisted_8, toDisplayString(item.labelExpand), 1)], 8, _hoisted_7), createElementVNode("div", _hoisted_9, toDisplayString(item.parentName), 1)], 8, _hoisted_6))]),
128
+ }, [createVNode(unref(NPopover), {
129
+ trigger: "hover"
130
+ }, {
131
+ trigger: withCtx(() => [createElementVNode("span", null, toDisplayString(item.label), 1)]),
132
+ default: withCtx(() => [createElementVNode("div", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(getChildren(item), (childTag) => {
133
+ return openBlock(), createBlock(TagItem, {
134
+ key: childTag.key,
135
+ tag: childTag,
136
+ showClose: false
137
+ }, null, 8, ["tag"]);
138
+ }), 128))])]),
139
+ _: 2
140
+ }, 1024), createTextVNode(" " + toDisplayString(item.innerItemsNum ? `(${item.innerItemsNum}\u4EBA)` : "") + " ", 1), createElementVNode("span", _hoisted_9, toDisplayString(item.labelExpand), 1)], 8, _hoisted_7), createElementVNode("div", _hoisted_10, toDisplayString(item.parentName), 1)], 8, _hoisted_6)) : (openBlock(), createBlock(GroupItem, {
141
+ key: 1,
142
+ item,
143
+ onChecked: handleClick
144
+ }, null, 8, ["item"]))]),
106
145
  _: 2
107
146
  }, 1032, ["items"])], 64))], 4);
108
147
  }), 128)), !__props.data.length ? (openBlock(), createBlock(unref(DefaultPage), {
@@ -1,6 +1,7 @@
1
1
  import { ref, PropType } from 'vue';
2
2
  import { type TreeOption } from 'naive-ui';
3
3
  import { AnyObject } from '../../../shared/types';
4
+ import { Strategy } from './types';
4
5
  type IKey = string | number;
5
6
  type ITreeOption = TreeOption & AnyObject;
6
7
  type IWordBook<T> = {
@@ -1539,14 +1540,13 @@ declare const _default: import("vue").DefineComponent<{
1539
1540
  renderLabel: ({ option }: {
1540
1541
  option: TreeOption;
1541
1542
  }) => JSX.Element;
1543
+ getChildren: (tag: import("./types").PTreeOption) => AnyObject[];
1542
1544
  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) => {
1543
1545
  treeItems: import("./types").PTreeOption[];
1544
1546
  leafCount: number;
1545
- innerItems: any[];
1546
1547
  };
1547
- getTreeOptionChildren: (item: import("./types").PTreeOption) => void;
1548
1548
  onSearch: () => Promise<void>;
1549
- getAllKeys: (tree: import("./types").PTreeOption[], strategy: import("./types").Strategy) => (string | number)[];
1549
+ getAllKeys: (tree: import("./types").PTreeOption[], strategy: Strategy) => (string | number)[];
1550
1550
  getParentKeys: (node: import("./types").PTreeOption, map: Map<string | number, import("./types").PTreeOption>) => never[];
1551
1551
  getTopLevelCheckedKey: (node: import("./types").PTreeOption, checked: Set<string | number>, map: Map<string | number, import("./types").PTreeOption>) => string | number;
1552
1552
  checkedAllChange: (checked: boolean) => void;
@@ -1559,7 +1559,7 @@ declare const _default: import("vue").DefineComponent<{
1559
1559
  updateChecked: (key: string | number, checked: boolean) => void;
1560
1560
  notifyCheck: (key: string | number, isChecked?: boolean) => void;
1561
1561
  checkSearchClear: (kw: string) => void;
1562
- getCheckWithLevel: (strategy?: import("./types").Strategy | undefined, hideLeaf?: boolean | undefined) => {
1562
+ getCheckWithLevel: (strategy?: Strategy | undefined, hideLeaf?: boolean | undefined) => {
1563
1563
  parentNode: import("./types").PTreeOption | undefined;
1564
1564
  key: string | number;
1565
1565
  label: string;
@@ -1597,6 +1597,14 @@ declare const _default: import("vue").DefineComponent<{
1597
1597
  }[]>;
1598
1598
  required: true;
1599
1599
  };
1600
+ wordbook: {
1601
+ type: PropType<import("./types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
1602
+ default: () => {};
1603
+ };
1604
+ showTagHover: {
1605
+ type: BooleanConstructor;
1606
+ default: boolean;
1607
+ };
1600
1608
  type: {
1601
1609
  type: StringConstructor;
1602
1610
  default: string;
@@ -1616,6 +1624,14 @@ declare const _default: import("vue").DefineComponent<{
1616
1624
  }[]>;
1617
1625
  required: true;
1618
1626
  };
1627
+ wordbook: {
1628
+ type: PropType<import("./types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
1629
+ default: () => {};
1630
+ };
1631
+ showTagHover: {
1632
+ type: BooleanConstructor;
1633
+ default: boolean;
1634
+ };
1619
1635
  type: {
1620
1636
  type: StringConstructor;
1621
1637
  default: string;
@@ -1632,10 +1648,12 @@ declare const _default: import("vue").DefineComponent<{
1632
1648
  parentName: string;
1633
1649
  }[];
1634
1650
  }[]>;
1651
+ getChildren: (tag: import("./types").PTreeOption) => AnyObject[];
1635
1652
  handleClick: (item: AnyObject) => void;
1636
1653
  handleChange: (item: AnyObject, checked: boolean) => void;
1637
1654
  NVirtualList: any;
1638
1655
  NCheckbox: any;
1656
+ NPopover: any;
1639
1657
  CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
1640
1658
  type: {
1641
1659
  type: StringConstructor;
@@ -1691,6 +1709,62 @@ declare const _default: import("vue").DefineComponent<{
1691
1709
  type: string;
1692
1710
  config: AnyObject;
1693
1711
  }>>;
1712
+ GroupItem: import("vue").DefineComponent<{
1713
+ item: {
1714
+ type: PropType<AnyObject>;
1715
+ required: true;
1716
+ };
1717
+ }, {
1718
+ emit: (event: "checked", ...args: any[]) => void;
1719
+ handleClick: (item: AnyObject) => void;
1720
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1721
+ item: {
1722
+ type: PropType<AnyObject>;
1723
+ required: true;
1724
+ };
1725
+ }>> & {
1726
+ onChecked?: ((...args: any[]) => any) | undefined;
1727
+ }, {}>;
1728
+ TagItem: import("vue").DefineComponent<{
1729
+ tag: {
1730
+ type: PropType<AnyObject>;
1731
+ required: true;
1732
+ };
1733
+ showClose: {
1734
+ type: BooleanConstructor;
1735
+ default: boolean;
1736
+ };
1737
+ }, {
1738
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1739
+ tag: {
1740
+ type: PropType<AnyObject>;
1741
+ required: true;
1742
+ };
1743
+ showClose: {
1744
+ type: BooleanConstructor;
1745
+ default: boolean;
1746
+ };
1747
+ }>> & {
1748
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1749
+ }>>;
1750
+ emit: (event: "unchecked", ...args: any[]) => void;
1751
+ updateChecked: (key: string, checked: boolean) => void;
1752
+ NIcon: any;
1753
+ 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<{}>>, {}>;
1754
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1755
+ tag: {
1756
+ type: PropType<AnyObject>;
1757
+ required: true;
1758
+ };
1759
+ showClose: {
1760
+ type: BooleanConstructor;
1761
+ default: boolean;
1762
+ };
1763
+ }>> & {
1764
+ onUnchecked?: ((...args: any[]) => any) | undefined;
1765
+ }, {
1766
+ showClose: boolean;
1767
+ }>;
1694
1768
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1695
1769
  data: {
1696
1770
  type: PropType<{
@@ -1704,6 +1778,14 @@ declare const _default: import("vue").DefineComponent<{
1704
1778
  }[]>;
1705
1779
  required: true;
1706
1780
  };
1781
+ wordbook: {
1782
+ type: PropType<import("./types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
1783
+ default: () => {};
1784
+ };
1785
+ showTagHover: {
1786
+ type: BooleanConstructor;
1787
+ default: boolean;
1788
+ };
1707
1789
  type: {
1708
1790
  type: StringConstructor;
1709
1791
  default: string;
@@ -1712,6 +1794,8 @@ declare const _default: import("vue").DefineComponent<{
1712
1794
  onChecked?: ((...args: any[]) => any) | undefined;
1713
1795
  }, {
1714
1796
  type: string;
1797
+ wordbook: import("./types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>;
1798
+ showTagHover: boolean;
1715
1799
  }>;
1716
1800
  TagItem: import("vue").DefineComponent<{
1717
1801
  tag: {
@@ -2033,7 +2117,7 @@ declare const _default: import("vue").DefineComponent<{
2033
2117
  [x: string]: unknown;
2034
2118
  }>;
2035
2119
  emits: (event: "check" | "checkWithLevel", ...args: any[]) => void;
2036
- getCheckWithLevel: () => any;
2120
+ getCheckWithLevel: (strategy?: Strategy, hideLeaf?: boolean) => any;
2037
2121
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("check" | "checkWithLevel")[], "check" | "checkWithLevel", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2038
2122
  defaultList: {
2039
2123
  type: PropType<(IKey | ITag)[]>;
@@ -153,9 +153,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
153
153
  __emits(eventName, ...args);
154
154
  };
155
155
  provide(InjectionSelectPersonEmits, emits);
156
- const getCheckWithLevel = () => {
156
+ const getCheckWithLevel = (strategy, hideLeaf) => {
157
157
  var _a;
158
- return (_a = selectPersonRef.value) == null ? void 0 : _a.getCheckWithLevel();
158
+ return (_a = selectPersonRef.value) == null ? void 0 : _a.getCheckWithLevel(strategy, hideLeaf);
159
159
  };
160
160
  expose({
161
161
  getCheckWithLevel
@@ -1,4 +1,6 @@
1
1
  import { type TreeOption } from 'naive-ui';
2
+ import { AnyObject } from '../../../../shared/types';
2
3
  export declare function searchFilterTree(attr: string, data: TreeOption[], keyword: string, filterKey: string): any[];
3
4
  export declare function searchBasisTree(data: TreeOption[], keyword: string, filterKey: string): TreeOption[];
5
+ export declare function getAllChildren(tag: AnyObject, childrenKey: string): AnyObject[];
4
6
  export declare function getExpandedKeys(tree: TreeOption[]): (string | number)[];
@@ -22,6 +22,29 @@ function searchBasisTree(data, keyword, filterKey) {
22
22
  transform(data, keyword, filterKey);
23
23
  return filterHandle(data);
24
24
  }
25
+ function getAllChildren(tag, childrenKey) {
26
+ const cache = /* @__PURE__ */ new WeakMap();
27
+ function* childrenIterator(node) {
28
+ if (cache.has(node)) {
29
+ yield* cache.get(node);
30
+ return;
31
+ }
32
+ const result = [];
33
+ const children = node[childrenKey];
34
+ if ((node == null ? void 0 : node.leaf) && !(node == null ? void 0 : node.disabled)) {
35
+ result.push(node);
36
+ yield node;
37
+ } else {
38
+ if (children == null ? void 0 : children.length) {
39
+ for (const child of children) {
40
+ yield* childrenIterator(child);
41
+ }
42
+ }
43
+ }
44
+ cache.set(node, result);
45
+ }
46
+ return Array.from(childrenIterator(tag));
47
+ }
25
48
  function transform(data, keyword, filterKey) {
26
49
  data.forEach((item) => {
27
50
  var _a;
@@ -108,4 +131,4 @@ function getExpandedKeys(tree) {
108
131
  return expandedKeys;
109
132
  }
110
133
 
111
- export { getExpandedKeys, searchBasisTree, searchFilterTree };
134
+ export { getAllChildren, getExpandedKeys, searchBasisTree, searchFilterTree };
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.3.3-beta.13";
2
+ var version = "3.3.3-beta.15";
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.3.3-beta.13",
3
+ "version": "3.3.3-beta.15",
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": "41910b2d19f33ed2feac6a63c5450f5124f48b80"
76
+ "gitHead": "b3c7727fd02488c58b52cef69d5fa97a264ca5b2"
77
77
  }