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.
- package/es/components/expand-field/index.d.ts +86 -3
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +86 -3
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +86 -3
- package/es/components/expand-field/src/components/form.vue.d.ts +86 -3
- package/es/components/expand-field/src/index.vue.d.ts +86 -3
- package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
- package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -4
- package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
- package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
- package/es/components/select-person/index.d.ts +86 -3
- package/es/components/select-person/src/SelectPerson.vue.d.ts +85 -2
- package/es/components/select-person/src/SelectPerson.vue2.js +19 -16
- package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
- package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
- package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
- package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +87 -0
- package/es/components/select-person/src/components/SearchGroupList.vue2.js +44 -5
- package/es/components/select-person/src/index.vue.d.ts +89 -5
- package/es/components/select-person/src/index.vue2.js +2 -2
- package/es/components/select-person/src/utils/index.d.ts +2 -0
- package/es/components/select-person/src/utils/index.js +24 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/select-person/src/SelectPersonTest.vue.d.ts +0 -555
|
@@ -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
|
+
wordbook: {
|
|
2029
|
+
type: PropType<import("../../select-person/src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
2030
|
+
default: () => {};
|
|
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
|
+
wordbook: {
|
|
2056
|
+
type: PropType<import("../../select-person/src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
2057
|
+
default: () => {};
|
|
2058
|
+
};
|
|
2059
|
+
showTagHover: {
|
|
2060
|
+
type: BooleanConstructor;
|
|
2061
|
+
default: boolean;
|
|
2062
|
+
};
|
|
2048
2063
|
type: {
|
|
2049
2064
|
type: StringConstructor;
|
|
2050
2065
|
default: string;
|
|
@@ -2061,10 +2076,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2061
2076
|
parentName: string;
|
|
2062
2077
|
}[];
|
|
2063
2078
|
}[]>;
|
|
2079
|
+
getChildren: (tag: import("../../select-person/src/types").PTreeOption) => AnyObject[];
|
|
2064
2080
|
handleClick: (item: AnyObject) => void;
|
|
2065
2081
|
handleChange: (item: AnyObject, checked: boolean) => void;
|
|
2066
2082
|
NVirtualList: any;
|
|
2067
2083
|
NCheckbox: any;
|
|
2084
|
+
NPopover: any;
|
|
2068
2085
|
CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
2069
2086
|
type: {
|
|
2070
2087
|
type: StringConstructor;
|
|
@@ -2120,6 +2137,62 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2120
2137
|
type: string;
|
|
2121
2138
|
config: AnyObject;
|
|
2122
2139
|
}>>;
|
|
2140
|
+
GroupItem: import("vue").DefineComponent<{
|
|
2141
|
+
item: {
|
|
2142
|
+
type: PropType<AnyObject>;
|
|
2143
|
+
required: true;
|
|
2144
|
+
};
|
|
2145
|
+
}, {
|
|
2146
|
+
emit: (event: "checked", ...args: any[]) => void;
|
|
2147
|
+
handleClick: (item: AnyObject) => void;
|
|
2148
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2149
|
+
item: {
|
|
2150
|
+
type: PropType<AnyObject>;
|
|
2151
|
+
required: true;
|
|
2152
|
+
};
|
|
2153
|
+
}>> & {
|
|
2154
|
+
onChecked?: ((...args: any[]) => any) | undefined;
|
|
2155
|
+
}, {}>;
|
|
2156
|
+
TagItem: import("vue").DefineComponent<{
|
|
2157
|
+
tag: {
|
|
2158
|
+
type: PropType<AnyObject>;
|
|
2159
|
+
required: true;
|
|
2160
|
+
};
|
|
2161
|
+
showClose: {
|
|
2162
|
+
type: BooleanConstructor;
|
|
2163
|
+
default: boolean;
|
|
2164
|
+
};
|
|
2165
|
+
}, {
|
|
2166
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
2167
|
+
tag: {
|
|
2168
|
+
type: PropType<AnyObject>;
|
|
2169
|
+
required: true;
|
|
2170
|
+
};
|
|
2171
|
+
showClose: {
|
|
2172
|
+
type: BooleanConstructor;
|
|
2173
|
+
default: boolean;
|
|
2174
|
+
};
|
|
2175
|
+
}>> & {
|
|
2176
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
2177
|
+
}>>;
|
|
2178
|
+
emit: (event: "unchecked", ...args: any[]) => void;
|
|
2179
|
+
updateChecked: (key: string, checked: boolean) => void;
|
|
2180
|
+
NIcon: any;
|
|
2181
|
+
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<{}>>, {}>;
|
|
2182
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2183
|
+
tag: {
|
|
2184
|
+
type: PropType<AnyObject>;
|
|
2185
|
+
required: true;
|
|
2186
|
+
};
|
|
2187
|
+
showClose: {
|
|
2188
|
+
type: BooleanConstructor;
|
|
2189
|
+
default: boolean;
|
|
2190
|
+
};
|
|
2191
|
+
}>> & {
|
|
2192
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
2193
|
+
}, {
|
|
2194
|
+
showClose: boolean;
|
|
2195
|
+
}>;
|
|
2123
2196
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2124
2197
|
data: {
|
|
2125
2198
|
type: PropType<{
|
|
@@ -2133,6 +2206,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2133
2206
|
}[]>;
|
|
2134
2207
|
required: true;
|
|
2135
2208
|
};
|
|
2209
|
+
wordbook: {
|
|
2210
|
+
type: PropType<import("../../select-person/src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
2211
|
+
default: () => {};
|
|
2212
|
+
};
|
|
2213
|
+
showTagHover: {
|
|
2214
|
+
type: BooleanConstructor;
|
|
2215
|
+
default: boolean;
|
|
2216
|
+
};
|
|
2136
2217
|
type: {
|
|
2137
2218
|
type: StringConstructor;
|
|
2138
2219
|
default: string;
|
|
@@ -2141,6 +2222,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2141
2222
|
onChecked?: ((...args: any[]) => any) | undefined;
|
|
2142
2223
|
}, {
|
|
2143
2224
|
type: string;
|
|
2225
|
+
wordbook: import("../../select-person/src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>;
|
|
2226
|
+
showTagHover: boolean;
|
|
2144
2227
|
}>;
|
|
2145
2228
|
TagItem: import("vue").DefineComponent<{
|
|
2146
2229
|
tag: {
|
|
@@ -2475,7 +2558,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2475
2558
|
[x: string]: unknown;
|
|
2476
2559
|
}>;
|
|
2477
2560
|
emits: (event: "check" | "checkWithLevel", ...args: any[]) => void;
|
|
2478
|
-
getCheckWithLevel: () => any;
|
|
2561
|
+
getCheckWithLevel: (strategy?: import("../../select-person/src/types").Strategy | undefined, hideLeaf?: boolean | undefined) => any;
|
|
2479
2562
|
}, 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
2563
|
defaultList: {
|
|
2481
2564
|
type: PropType<((string | number) | {
|
|
@@ -534,12 +534,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
534
534
|
}>;
|
|
535
535
|
developMode: boolean;
|
|
536
536
|
draggable: boolean;
|
|
537
|
-
isHighlightRow: boolean;
|
|
538
|
-
idx: number;
|
|
539
|
-
isHighlight: boolean;
|
|
540
|
-
isFieldSet: boolean;
|
|
541
537
|
fieldDescribeMode: "column" | "tooltip";
|
|
538
|
+
isFieldSet: boolean;
|
|
542
539
|
hideExpressionOption: AnyObject[];
|
|
540
|
+
idx: number;
|
|
541
|
+
isHighlight: boolean;
|
|
542
|
+
isHighlightRow: boolean;
|
|
543
543
|
}>;
|
|
544
544
|
EditDialog: import("vue").DefineComponent<{
|
|
545
545
|
visible: {
|
|
@@ -563,12 +563,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
563
563
|
}>;
|
|
564
564
|
developMode: boolean;
|
|
565
565
|
draggable: boolean;
|
|
566
|
-
isHighlightRow: boolean;
|
|
567
|
-
idx: number;
|
|
568
|
-
isHighlight: boolean;
|
|
569
|
-
isFieldSet: boolean;
|
|
570
566
|
fieldDescribeMode: "column" | "tooltip";
|
|
567
|
+
isFieldSet: boolean;
|
|
571
568
|
hideExpressionOption: AnyObject[];
|
|
569
|
+
idx: number;
|
|
570
|
+
isHighlight: boolean;
|
|
571
|
+
isHighlightRow: boolean;
|
|
572
572
|
}>;
|
|
573
573
|
setStyle: typeof setStyle;
|
|
574
574
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -754,12 +754,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
754
754
|
}>;
|
|
755
755
|
developMode: boolean;
|
|
756
756
|
draggable: boolean;
|
|
757
|
-
isHighlightRow: boolean;
|
|
758
|
-
idx: number;
|
|
759
|
-
isHighlight: boolean;
|
|
760
|
-
isFieldSet: boolean;
|
|
761
757
|
fieldDescribeMode: "column" | "tooltip";
|
|
758
|
+
isFieldSet: boolean;
|
|
762
759
|
hideExpressionOption: AnyObject[];
|
|
760
|
+
idx: number;
|
|
761
|
+
isHighlight: boolean;
|
|
762
|
+
isHighlightRow: boolean;
|
|
763
763
|
}>;
|
|
764
764
|
isArray: {
|
|
765
765
|
(value?: any): value is any[];
|
|
@@ -898,9 +898,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
898
898
|
showSeq: boolean;
|
|
899
899
|
developMode: boolean;
|
|
900
900
|
footerFlag: boolean;
|
|
901
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
902
901
|
customColumns: FieldSetColumnItem[];
|
|
903
902
|
showSortPriority: boolean;
|
|
904
903
|
showHeadFilter: boolean;
|
|
904
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
905
905
|
}>;
|
|
906
906
|
export default _default;
|
|
@@ -383,11 +383,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
383
383
|
}>;
|
|
384
384
|
developMode: boolean;
|
|
385
385
|
draggable: boolean;
|
|
386
|
-
isHighlightRow: boolean;
|
|
387
|
-
idx: number;
|
|
388
|
-
isHighlight: boolean;
|
|
389
|
-
isFieldSet: boolean;
|
|
390
386
|
fieldDescribeMode: "column" | "tooltip";
|
|
387
|
+
isFieldSet: boolean;
|
|
391
388
|
hideExpressionOption: AnyObject[];
|
|
389
|
+
idx: number;
|
|
390
|
+
isHighlight: boolean;
|
|
391
|
+
isHighlightRow: boolean;
|
|
392
392
|
}>;
|
|
393
393
|
export default _default;
|
|
@@ -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
|
+
wordbook: {
|
|
1606
|
+
type: import("vue").PropType<import("./src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject>>;
|
|
1607
|
+
default: () => {};
|
|
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
|
+
wordbook: {
|
|
1633
|
+
type: import("vue").PropType<import("./src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject>>;
|
|
1634
|
+
default: () => {};
|
|
1635
|
+
};
|
|
1636
|
+
showTagHover: {
|
|
1637
|
+
type: BooleanConstructor;
|
|
1638
|
+
default: boolean;
|
|
1639
|
+
};
|
|
1625
1640
|
type: {
|
|
1626
1641
|
type: StringConstructor;
|
|
1627
1642
|
default: string;
|
|
@@ -1638,10 +1653,12 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1638
1653
|
parentName: string;
|
|
1639
1654
|
}[];
|
|
1640
1655
|
}[]>;
|
|
1656
|
+
getChildren: (tag: import("./src/types").PTreeOption) => import("../../shared/types").AnyObject[];
|
|
1641
1657
|
handleClick: (item: import("../../shared/types").AnyObject) => void;
|
|
1642
1658
|
handleChange: (item: import("../../shared/types").AnyObject, checked: boolean) => void;
|
|
1643
1659
|
NVirtualList: any;
|
|
1644
1660
|
NCheckbox: any;
|
|
1661
|
+
NPopover: any;
|
|
1645
1662
|
CDefaultPage: SFCWithInstall<import("vue").DefineComponent<{
|
|
1646
1663
|
type: {
|
|
1647
1664
|
type: StringConstructor;
|
|
@@ -1697,6 +1714,62 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1697
1714
|
type: string;
|
|
1698
1715
|
config: import("../../shared/types").AnyObject;
|
|
1699
1716
|
}>>;
|
|
1717
|
+
GroupItem: import("vue").DefineComponent<{
|
|
1718
|
+
item: {
|
|
1719
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
|
1720
|
+
required: true;
|
|
1721
|
+
};
|
|
1722
|
+
}, {
|
|
1723
|
+
emit: (event: "checked", ...args: any[]) => void;
|
|
1724
|
+
handleClick: (item: import("../../shared/types").AnyObject) => void;
|
|
1725
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1726
|
+
item: {
|
|
1727
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
|
1728
|
+
required: true;
|
|
1729
|
+
};
|
|
1730
|
+
}>> & {
|
|
1731
|
+
onChecked?: ((...args: any[]) => any) | undefined;
|
|
1732
|
+
}, {}>;
|
|
1733
|
+
TagItem: import("vue").DefineComponent<{
|
|
1734
|
+
tag: {
|
|
1735
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
|
1736
|
+
required: true;
|
|
1737
|
+
};
|
|
1738
|
+
showClose: {
|
|
1739
|
+
type: BooleanConstructor;
|
|
1740
|
+
default: boolean;
|
|
1741
|
+
};
|
|
1742
|
+
}, {
|
|
1743
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
1744
|
+
tag: {
|
|
1745
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
|
1746
|
+
required: true;
|
|
1747
|
+
};
|
|
1748
|
+
showClose: {
|
|
1749
|
+
type: BooleanConstructor;
|
|
1750
|
+
default: boolean;
|
|
1751
|
+
};
|
|
1752
|
+
}>> & {
|
|
1753
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
1754
|
+
}>>;
|
|
1755
|
+
emit: (event: "unchecked", ...args: any[]) => void;
|
|
1756
|
+
updateChecked: (key: string, checked: boolean) => void;
|
|
1757
|
+
NIcon: any;
|
|
1758
|
+
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<{}>>, {}>;
|
|
1759
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1760
|
+
tag: {
|
|
1761
|
+
type: import("vue").PropType<import("../../shared/types").AnyObject>;
|
|
1762
|
+
required: true;
|
|
1763
|
+
};
|
|
1764
|
+
showClose: {
|
|
1765
|
+
type: BooleanConstructor;
|
|
1766
|
+
default: boolean;
|
|
1767
|
+
};
|
|
1768
|
+
}>> & {
|
|
1769
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
1770
|
+
}, {
|
|
1771
|
+
showClose: boolean;
|
|
1772
|
+
}>;
|
|
1700
1773
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1701
1774
|
data: {
|
|
1702
1775
|
type: import("vue").PropType<{
|
|
@@ -1710,6 +1783,14 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1710
1783
|
}[]>;
|
|
1711
1784
|
required: true;
|
|
1712
1785
|
};
|
|
1786
|
+
wordbook: {
|
|
1787
|
+
type: import("vue").PropType<import("./src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject>>;
|
|
1788
|
+
default: () => {};
|
|
1789
|
+
};
|
|
1790
|
+
showTagHover: {
|
|
1791
|
+
type: BooleanConstructor;
|
|
1792
|
+
default: boolean;
|
|
1793
|
+
};
|
|
1713
1794
|
type: {
|
|
1714
1795
|
type: StringConstructor;
|
|
1715
1796
|
default: string;
|
|
@@ -1718,6 +1799,8 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1718
1799
|
onChecked?: ((...args: any[]) => any) | undefined;
|
|
1719
1800
|
}, {
|
|
1720
1801
|
type: string;
|
|
1802
|
+
wordbook: import("./src/types").IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../shared/types").AnyObject>;
|
|
1803
|
+
showTagHover: boolean;
|
|
1721
1804
|
}>;
|
|
1722
1805
|
TagItem: import("vue").DefineComponent<{
|
|
1723
1806
|
tag: {
|
|
@@ -2052,7 +2135,7 @@ declare const SelectPerson: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2052
2135
|
[x: string]: unknown;
|
|
2053
2136
|
}>;
|
|
2054
2137
|
emits: (event: "check" | "checkWithLevel", ...args: any[]) => void;
|
|
2055
|
-
getCheckWithLevel: () => any;
|
|
2138
|
+
getCheckWithLevel: (strategy?: import("./src/types").Strategy | undefined, hideLeaf?: boolean | undefined) => any;
|
|
2056
2139
|
}, 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
2140
|
defaultList: {
|
|
2058
2141
|
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
|
+
wordbook: {
|
|
329
|
+
type: PropType<IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
330
|
+
default: () => {};
|
|
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
|
+
wordbook: {
|
|
356
|
+
type: PropType<IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
357
|
+
default: () => {};
|
|
358
|
+
};
|
|
359
|
+
showTagHover: {
|
|
360
|
+
type: BooleanConstructor;
|
|
361
|
+
default: boolean;
|
|
362
|
+
};
|
|
348
363
|
type: {
|
|
349
364
|
type: StringConstructor;
|
|
350
365
|
default: string;
|
|
@@ -361,10 +376,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
361
376
|
parentName: string;
|
|
362
377
|
}[];
|
|
363
378
|
}[]>;
|
|
379
|
+
getChildren: (tag: PTreeOption) => AnyObject[];
|
|
364
380
|
handleClick: (item: AnyObject) => void;
|
|
365
381
|
handleChange: (item: AnyObject, checked: boolean) => void;
|
|
366
382
|
NVirtualList: any;
|
|
367
383
|
NCheckbox: any;
|
|
384
|
+
NPopover: any;
|
|
368
385
|
CDefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
|
369
386
|
type: {
|
|
370
387
|
type: StringConstructor;
|
|
@@ -420,6 +437,62 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
420
437
|
type: string;
|
|
421
438
|
config: AnyObject;
|
|
422
439
|
}>>;
|
|
440
|
+
GroupItem: import("vue").DefineComponent<{
|
|
441
|
+
item: {
|
|
442
|
+
type: PropType<AnyObject>;
|
|
443
|
+
required: true;
|
|
444
|
+
};
|
|
445
|
+
}, {
|
|
446
|
+
emit: (event: "checked", ...args: any[]) => void;
|
|
447
|
+
handleClick: (item: AnyObject) => void;
|
|
448
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
449
|
+
item: {
|
|
450
|
+
type: PropType<AnyObject>;
|
|
451
|
+
required: true;
|
|
452
|
+
};
|
|
453
|
+
}>> & {
|
|
454
|
+
onChecked?: ((...args: any[]) => any) | undefined;
|
|
455
|
+
}, {}>;
|
|
456
|
+
TagItem: import("vue").DefineComponent<{
|
|
457
|
+
tag: {
|
|
458
|
+
type: PropType<AnyObject>;
|
|
459
|
+
required: true;
|
|
460
|
+
};
|
|
461
|
+
showClose: {
|
|
462
|
+
type: BooleanConstructor;
|
|
463
|
+
default: boolean;
|
|
464
|
+
};
|
|
465
|
+
}, {
|
|
466
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
467
|
+
tag: {
|
|
468
|
+
type: PropType<AnyObject>;
|
|
469
|
+
required: true;
|
|
470
|
+
};
|
|
471
|
+
showClose: {
|
|
472
|
+
type: BooleanConstructor;
|
|
473
|
+
default: boolean;
|
|
474
|
+
};
|
|
475
|
+
}>> & {
|
|
476
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
477
|
+
}>>;
|
|
478
|
+
emit: (event: "unchecked", ...args: any[]) => void;
|
|
479
|
+
updateChecked: (key: string, checked: boolean) => void;
|
|
480
|
+
NIcon: any;
|
|
481
|
+
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<{}>>, {}>;
|
|
482
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "unchecked"[], "unchecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
483
|
+
tag: {
|
|
484
|
+
type: PropType<AnyObject>;
|
|
485
|
+
required: true;
|
|
486
|
+
};
|
|
487
|
+
showClose: {
|
|
488
|
+
type: BooleanConstructor;
|
|
489
|
+
default: boolean;
|
|
490
|
+
};
|
|
491
|
+
}>> & {
|
|
492
|
+
onUnchecked?: ((...args: any[]) => any) | undefined;
|
|
493
|
+
}, {
|
|
494
|
+
showClose: boolean;
|
|
495
|
+
}>;
|
|
423
496
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "checked"[], "checked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
424
497
|
data: {
|
|
425
498
|
type: PropType<{
|
|
@@ -433,6 +506,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
433
506
|
}[]>;
|
|
434
507
|
required: true;
|
|
435
508
|
};
|
|
509
|
+
wordbook: {
|
|
510
|
+
type: PropType<IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>>;
|
|
511
|
+
default: () => {};
|
|
512
|
+
};
|
|
513
|
+
showTagHover: {
|
|
514
|
+
type: BooleanConstructor;
|
|
515
|
+
default: boolean;
|
|
516
|
+
};
|
|
436
517
|
type: {
|
|
437
518
|
type: StringConstructor;
|
|
438
519
|
default: string;
|
|
@@ -441,6 +522,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
441
522
|
onChecked?: ((...args: any[]) => any) | undefined;
|
|
442
523
|
}, {
|
|
443
524
|
type: string;
|
|
525
|
+
wordbook: IWordBook<import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject>;
|
|
526
|
+
showTagHover: boolean;
|
|
444
527
|
}>;
|
|
445
528
|
TagItem: import("vue").DefineComponent<{
|
|
446
529
|
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,17 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
249
249
|
}, [labelExpand])]);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
+
function getChildren(tag) {
|
|
253
|
+
var _a;
|
|
254
|
+
if (!tag || !tag.children)
|
|
255
|
+
return [];
|
|
256
|
+
const {
|
|
257
|
+
children: childrenKey = "children"
|
|
258
|
+
} = props.wordbook;
|
|
259
|
+
if (!tag || !((_a = tag[childrenKey]) == null ? void 0 : _a.length))
|
|
260
|
+
return [];
|
|
261
|
+
return getAllChildren(tag, childrenKey);
|
|
262
|
+
}
|
|
252
263
|
function transformData(trees, parentNode, visitor) {
|
|
253
264
|
const {
|
|
254
265
|
children: childrenKey = "children",
|
|
@@ -265,7 +276,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
265
276
|
user_expand_keys
|
|
266
277
|
} = props.wordbookChild;
|
|
267
278
|
let leafCount = 0;
|
|
268
|
-
let innerItems = [];
|
|
269
279
|
const {
|
|
270
280
|
label: parentLabel = "",
|
|
271
281
|
parentName = "",
|
|
@@ -288,7 +298,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
288
298
|
parentKey,
|
|
289
299
|
parentName: parentLabel + (parentName ? parentLabel ? `/${parentName}` : parentName : ""),
|
|
290
300
|
innerItemsNum: 0,
|
|
291
|
-
innerChildren: [],
|
|
292
301
|
children: void 0,
|
|
293
302
|
originItem: item,
|
|
294
303
|
leaf: isLeaf,
|
|
@@ -306,7 +315,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
306
315
|
}
|
|
307
316
|
if (!tree.disabled) {
|
|
308
317
|
leafCount++;
|
|
309
|
-
innerItems.push(tree);
|
|
310
318
|
}
|
|
311
319
|
} else {
|
|
312
320
|
if (children == null ? void 0 : children.length) {
|
|
@@ -315,9 +323,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
315
323
|
tree.children = childData.treeItems;
|
|
316
324
|
}
|
|
317
325
|
tree.innerItemsNum += childData.leafCount;
|
|
318
|
-
tree.innerChildren = [...childData.innerItems, ...tree.innerChildren];
|
|
319
326
|
leafCount += tree.innerItemsNum;
|
|
320
|
-
innerItems = [...innerItems, ...tree.innerChildren];
|
|
321
327
|
}
|
|
322
328
|
if (!empty_enable && tree.innerItemsNum == 0 && !isRemote.value)
|
|
323
329
|
tree.disabled = true;
|
|
@@ -327,8 +333,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
327
333
|
});
|
|
328
334
|
return {
|
|
329
335
|
treeItems,
|
|
330
|
-
leafCount
|
|
331
|
-
innerItems
|
|
336
|
+
leafCount
|
|
332
337
|
};
|
|
333
338
|
}
|
|
334
339
|
async function onSearch() {
|
|
@@ -353,10 +358,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
353
358
|
const originItem = node.originItem;
|
|
354
359
|
const match = label.includes(kw) || labelExpand.includes(kw) || originItem && originItem[filterKey] && String(originItem[filterKey]).includes(kw);
|
|
355
360
|
if (match) {
|
|
356
|
-
result.push(
|
|
357
|
-
...node,
|
|
358
|
-
children: void 0
|
|
359
|
-
});
|
|
361
|
+
result.push(node);
|
|
360
362
|
}
|
|
361
363
|
if (node.children && node.children.length > 0) {
|
|
362
364
|
stack.push(...node.children);
|
|
@@ -673,8 +675,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
673
675
|
class: "c-select-person__hide",
|
|
674
676
|
type: unref(showType),
|
|
675
677
|
data: unref(searchData),
|
|
678
|
+
showTagHover: __props.showTagHover,
|
|
679
|
+
wordbook: __props.wordbook,
|
|
676
680
|
onChecked: notifyCheck
|
|
677
|
-
}, null, 8, ["type", "data"])) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(NTree), mergeProps({
|
|
681
|
+
}, null, 8, ["type", "data", "showTagHover", "wordbook"])) : (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(NTree), mergeProps({
|
|
678
682
|
"expanded-keys": expandedKeys.value,
|
|
679
683
|
"onUpdate:expanded-keys": _cache[2] || (_cache[2] = ($event) => expandedKeys.value = $event),
|
|
680
684
|
"selected-keys": checkedKeys.value,
|
|
@@ -747,12 +751,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
747
751
|
tag: withCtx((filterProps) => [renderSlot(_ctx.$slots, "tag", normalizeProps(guardReactiveProps(filterProps)))]),
|
|
748
752
|
_: 2
|
|
749
753
|
}, 1032, ["tag"])]),
|
|
750
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(tag
|
|
754
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(getChildren(tag), (childTag) => {
|
|
751
755
|
return openBlock(), createBlock(TagItem, {
|
|
752
756
|
key: childTag.key,
|
|
753
757
|
tag: childTag,
|
|
754
|
-
showClose: false
|
|
755
|
-
onUnchecked: updateChecked
|
|
758
|
+
showClose: false
|
|
756
759
|
}, null, 8, ["tag"]);
|
|
757
760
|
}), 128))])]),
|
|
758
761
|
_: 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;
|