@gyyxds/zy-ui 0.0.2 → 0.0.4
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/CHANGELOG.md +12 -1
- package/CONTRIBUTING.md +29 -10
- package/LICENSE +21 -0
- package/README.md +148 -110
- package/dist/zy-ui/index.d.ts +69 -27
- package/dist/zy-ui/mega-menu/ZyMegaMenu.vue.d.ts +8 -0
- package/dist/zy-ui/mega-menu/index.d.ts +16 -0
- package/dist/zy-ui/mega-menu/types.d.ts +4 -4
- package/dist/zy-ui/select/ZySelect.vue.d.ts +29 -2
- package/dist/zy-ui/select/index.d.ts +51 -0
- package/dist/zy-ui/select/types.d.ts +9 -0
- package/dist/zy-ui/themes/basic.css +7 -2
- package/dist/zy-ui/themes/material.css +4 -0
- package/dist/zy-ui/themes/solid.css +799 -671
- package/dist/zy-ui/zy-ui.css +1 -1
- package/dist/zy-ui/zy-ui.js +609 -486
- package/package.json +6 -7
package/dist/zy-ui/index.d.ts
CHANGED
|
@@ -1,31 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zy UI
|
|
3
|
-
*
|
|
4
|
-
* 用法与 Element Plus 一致 —— 全局、按需、单组件注册三种都行:
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* // 全局
|
|
8
|
-
* import ZyUi from '@zy/zy-ui'
|
|
9
|
-
* import '@zy/zy-ui/style.css'
|
|
10
|
-
* app.use(ZyUi)
|
|
11
|
-
*
|
|
12
|
-
* // 按需(配合 tree-shaking,只打进来的组件会进包)
|
|
13
|
-
* import { ZyButton } from '@zy/zy-ui'
|
|
14
|
-
* import '@zy/zy-ui/style.css'
|
|
15
|
-
*
|
|
16
|
-
* // 单个组件自己注册(对齐 Element 的做法,组件自带 install)
|
|
17
|
-
* import { ZyButton } from '@zy/zy-ui'
|
|
18
|
-
* app.use(ZyButton)
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* 目录约定(同 Element):每个组件一个目录,入口 `index.ts` 负责导出与 install,
|
|
22
|
-
* 实现是同目录的 `Zy*.vue`;成族的组件(checkbox / radio)共用一个目录,
|
|
23
|
-
* 族内契约(如 radio-context)留在目录里,不进入公共 API。
|
|
24
|
-
*
|
|
25
|
-
* 依赖:组件内部直接使用 element-plus 的 `El*` 组件,所以 element-plus 是 peerDependency,
|
|
26
|
-
* 消费方需要自己装好并引入它的样式(`import 'element-plus/dist/index.css'`)。
|
|
27
|
-
* 组件层设计令牌(`--zy-brand` / `--zy-radius` / `--zy-ease-out` …)随本包发布,
|
|
28
|
-
* 见 `./styles/tokens.css`,可用同名变量覆盖换肤。
|
|
2
|
+
* Zy UI 入口:Element Plus 二次封装。
|
|
3
|
+
* 接入方式、目录约定与依赖说明见 README / AGENTS.md,不在此重复维护。
|
|
29
4
|
*/
|
|
30
5
|
import type { App } from 'vue';
|
|
31
6
|
import { ZyAlert } from './alert';
|
|
@@ -54,6 +29,7 @@ import { ZyTag } from './tag';
|
|
|
54
29
|
import { ZyTimePicker } from './time-picker';
|
|
55
30
|
import { ZyTree } from './tree';
|
|
56
31
|
export { ZyAlert, ZyBadge, ZyButton, ZyCard, ZyCheckbox, ZyCheckboxGroup, ZyCodeInput, ZyDatePicker, ZyDialog, ZyDivider, ZyIcon, ZyInput, ZyLoading, ZyMegaMenu, ZyPagination, ZyPanel, ZyProgress, ZyRadio, ZyRadioButton, ZyRadioGroup, ZySelect, ZySlideVerify, ZySpace, ZySwitch, ZyTable, ZyTag, ZyTimePicker, ZyTree, };
|
|
32
|
+
export type { ZyTreeNode, ZyTreeProps } from './select';
|
|
57
33
|
/** 全部组件的具名集合(名称即注册名) */
|
|
58
34
|
export declare const components: {
|
|
59
35
|
ZyAlert: import("./utils/withInstall").SFCWithInstall<{
|
|
@@ -677,10 +653,14 @@ export declare const components: {
|
|
|
677
653
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
678
654
|
items?: import("./mega-menu").MegaMenuItem[];
|
|
679
655
|
open?: string | null;
|
|
656
|
+
active?: string | null;
|
|
657
|
+
activeLink?: string | null;
|
|
680
658
|
label?: string;
|
|
681
659
|
brand?: import("./mega-menu").MegaMenuBrand | null;
|
|
682
660
|
}> & Readonly<{
|
|
683
661
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
662
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
663
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
684
664
|
onNavigate?: ((payload: {
|
|
685
665
|
item: import("./mega-menu").MegaMenuItem;
|
|
686
666
|
title: string;
|
|
@@ -689,6 +669,8 @@ export declare const components: {
|
|
|
689
669
|
}) => any) | undefined;
|
|
690
670
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
691
671
|
"update:open": (value: string | null) => any;
|
|
672
|
+
"update:active": (value: string | null) => any;
|
|
673
|
+
"update:activeLink": (value: string | null) => any;
|
|
692
674
|
navigate: (payload: {
|
|
693
675
|
item: import("./mega-menu").MegaMenuItem;
|
|
694
676
|
title: string;
|
|
@@ -709,10 +691,14 @@ export declare const components: {
|
|
|
709
691
|
}, Readonly<{
|
|
710
692
|
items?: import("./mega-menu").MegaMenuItem[];
|
|
711
693
|
open?: string | null;
|
|
694
|
+
active?: string | null;
|
|
695
|
+
activeLink?: string | null;
|
|
712
696
|
label?: string;
|
|
713
697
|
brand?: import("./mega-menu").MegaMenuBrand | null;
|
|
714
698
|
}> & Readonly<{
|
|
715
699
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
700
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
701
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
716
702
|
onNavigate?: ((payload: {
|
|
717
703
|
item: import("./mega-menu").MegaMenuItem;
|
|
718
704
|
title: string;
|
|
@@ -730,10 +716,14 @@ export declare const components: {
|
|
|
730
716
|
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
731
717
|
items?: import("./mega-menu").MegaMenuItem[];
|
|
732
718
|
open?: string | null;
|
|
719
|
+
active?: string | null;
|
|
720
|
+
activeLink?: string | null;
|
|
733
721
|
label?: string;
|
|
734
722
|
brand?: import("./mega-menu").MegaMenuBrand | null;
|
|
735
723
|
}> & Readonly<{
|
|
736
724
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
725
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
726
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
737
727
|
onNavigate?: ((payload: {
|
|
738
728
|
item: import("./mega-menu").MegaMenuItem;
|
|
739
729
|
title: string;
|
|
@@ -742,6 +732,8 @@ export declare const components: {
|
|
|
742
732
|
}) => any) | undefined;
|
|
743
733
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
744
734
|
"update:open": (value: string | null) => any;
|
|
735
|
+
"update:active": (value: string | null) => any;
|
|
736
|
+
"update:activeLink": (value: string | null) => any;
|
|
745
737
|
navigate: (payload: {
|
|
746
738
|
item: import("./mega-menu").MegaMenuItem;
|
|
747
739
|
title: string;
|
|
@@ -1018,6 +1010,14 @@ export declare const components: {
|
|
|
1018
1010
|
placeholder?: string;
|
|
1019
1011
|
clearable?: boolean;
|
|
1020
1012
|
disabled?: boolean;
|
|
1013
|
+
tree?: boolean;
|
|
1014
|
+
data?: import("./select").ZyTreeNode[];
|
|
1015
|
+
treeProps?: import("./select").ZyTreeProps;
|
|
1016
|
+
nodeKey?: string;
|
|
1017
|
+
showCheckbox?: boolean;
|
|
1018
|
+
checkStrictly?: boolean;
|
|
1019
|
+
defaultExpandAll?: boolean;
|
|
1020
|
+
renderAfterExpand?: boolean;
|
|
1021
1021
|
} & {
|
|
1022
1022
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
1023
1023
|
}> & Readonly<{
|
|
@@ -1027,10 +1027,18 @@ export declare const components: {
|
|
|
1027
1027
|
}, import("vue").PublicProps, {
|
|
1028
1028
|
size: "large" | "default" | "small";
|
|
1029
1029
|
effect: "focus" | "underline" | "gradient";
|
|
1030
|
+
data: import("./select").ZyTreeNode[];
|
|
1030
1031
|
disabled: boolean;
|
|
1031
1032
|
placeholder: string;
|
|
1032
1033
|
clearable: boolean;
|
|
1033
1034
|
raised: boolean;
|
|
1035
|
+
tree: boolean;
|
|
1036
|
+
treeProps: import("./select").ZyTreeProps;
|
|
1037
|
+
nodeKey: string;
|
|
1038
|
+
showCheckbox: boolean;
|
|
1039
|
+
checkStrictly: boolean;
|
|
1040
|
+
defaultExpandAll: boolean;
|
|
1041
|
+
renderAfterExpand: boolean;
|
|
1034
1042
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
1035
1043
|
P: {};
|
|
1036
1044
|
B: {};
|
|
@@ -1045,6 +1053,14 @@ export declare const components: {
|
|
|
1045
1053
|
placeholder?: string;
|
|
1046
1054
|
clearable?: boolean;
|
|
1047
1055
|
disabled?: boolean;
|
|
1056
|
+
tree?: boolean;
|
|
1057
|
+
data?: import("./select").ZyTreeNode[];
|
|
1058
|
+
treeProps?: import("./select").ZyTreeProps;
|
|
1059
|
+
nodeKey?: string;
|
|
1060
|
+
showCheckbox?: boolean;
|
|
1061
|
+
checkStrictly?: boolean;
|
|
1062
|
+
defaultExpandAll?: boolean;
|
|
1063
|
+
renderAfterExpand?: boolean;
|
|
1048
1064
|
} & {
|
|
1049
1065
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
1050
1066
|
}> & Readonly<{
|
|
@@ -1052,10 +1068,18 @@ export declare const components: {
|
|
|
1052
1068
|
}>, {}, {}, {}, {}, {
|
|
1053
1069
|
size: "large" | "default" | "small";
|
|
1054
1070
|
effect: "focus" | "underline" | "gradient";
|
|
1071
|
+
data: import("./select").ZyTreeNode[];
|
|
1055
1072
|
disabled: boolean;
|
|
1056
1073
|
placeholder: string;
|
|
1057
1074
|
clearable: boolean;
|
|
1058
1075
|
raised: boolean;
|
|
1076
|
+
tree: boolean;
|
|
1077
|
+
treeProps: import("./select").ZyTreeProps;
|
|
1078
|
+
nodeKey: string;
|
|
1079
|
+
showCheckbox: boolean;
|
|
1080
|
+
checkStrictly: boolean;
|
|
1081
|
+
defaultExpandAll: boolean;
|
|
1082
|
+
renderAfterExpand: boolean;
|
|
1059
1083
|
}>;
|
|
1060
1084
|
__isFragment?: never;
|
|
1061
1085
|
__isTeleport?: never;
|
|
@@ -1067,6 +1091,14 @@ export declare const components: {
|
|
|
1067
1091
|
placeholder?: string;
|
|
1068
1092
|
clearable?: boolean;
|
|
1069
1093
|
disabled?: boolean;
|
|
1094
|
+
tree?: boolean;
|
|
1095
|
+
data?: import("./select").ZyTreeNode[];
|
|
1096
|
+
treeProps?: import("./select").ZyTreeProps;
|
|
1097
|
+
nodeKey?: string;
|
|
1098
|
+
showCheckbox?: boolean;
|
|
1099
|
+
checkStrictly?: boolean;
|
|
1100
|
+
defaultExpandAll?: boolean;
|
|
1101
|
+
renderAfterExpand?: boolean;
|
|
1070
1102
|
} & {
|
|
1071
1103
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
1072
1104
|
}> & Readonly<{
|
|
@@ -1076,13 +1108,23 @@ export declare const components: {
|
|
|
1076
1108
|
}, string, {
|
|
1077
1109
|
size: "large" | "default" | "small";
|
|
1078
1110
|
effect: "focus" | "underline" | "gradient";
|
|
1111
|
+
data: import("./select").ZyTreeNode[];
|
|
1079
1112
|
disabled: boolean;
|
|
1080
1113
|
placeholder: string;
|
|
1081
1114
|
clearable: boolean;
|
|
1082
1115
|
raised: boolean;
|
|
1116
|
+
tree: boolean;
|
|
1117
|
+
treeProps: import("./select").ZyTreeProps;
|
|
1118
|
+
nodeKey: string;
|
|
1119
|
+
showCheckbox: boolean;
|
|
1120
|
+
checkStrictly: boolean;
|
|
1121
|
+
defaultExpandAll: boolean;
|
|
1122
|
+
renderAfterExpand: boolean;
|
|
1083
1123
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
1084
1124
|
$slots: {
|
|
1085
1125
|
[x: string]: ((props: any) => any) | undefined;
|
|
1126
|
+
} & {
|
|
1127
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
1086
1128
|
} & {
|
|
1087
1129
|
default?: (props: {}) => any;
|
|
1088
1130
|
};
|
|
@@ -4,6 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
items?: MegaMenuItem[];
|
|
5
5
|
/** 受控展开项(v-model:open);不传则自己管 */
|
|
6
6
|
open?: string | null;
|
|
7
|
+
/** 当前选中的一级项 key:选中态常亮,不随面板开合消失;不传则点了自己记 */
|
|
8
|
+
active?: string | null;
|
|
9
|
+
/** 当前选中的二级链接标题(同一面板内唯一);不传则点了自己记 */
|
|
10
|
+
activeLink?: string | null;
|
|
7
11
|
/** 导航区的无障碍名称 */
|
|
8
12
|
label?: string;
|
|
9
13
|
/** 左侧品牌区(也可以整块用 #brand 插槽接管) */
|
|
@@ -21,6 +25,8 @@ type __VLS_Slots = {} & {
|
|
|
21
25
|
};
|
|
22
26
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
27
|
"update:open": (value: string | null) => any;
|
|
28
|
+
"update:active": (value: string | null) => any;
|
|
29
|
+
"update:activeLink": (value: string | null) => any;
|
|
24
30
|
navigate: (payload: {
|
|
25
31
|
item: MegaMenuItem;
|
|
26
32
|
title: string;
|
|
@@ -29,6 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
29
35
|
}) => any;
|
|
30
36
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
37
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
38
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
39
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
32
40
|
onNavigate?: ((payload: {
|
|
33
41
|
item: MegaMenuItem;
|
|
34
42
|
title: string;
|
|
@@ -2,10 +2,14 @@ export declare const ZyMegaMenu: import("../utils/withInstall").SFCWithInstall<{
|
|
|
2
2
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
3
|
items?: import("./types").MegaMenuItem[];
|
|
4
4
|
open?: string | null;
|
|
5
|
+
active?: string | null;
|
|
6
|
+
activeLink?: string | null;
|
|
5
7
|
label?: string;
|
|
6
8
|
brand?: import("./types").MegaMenuBrand | null;
|
|
7
9
|
}> & Readonly<{
|
|
8
10
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
11
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
12
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
9
13
|
onNavigate?: ((payload: {
|
|
10
14
|
item: import("./types").MegaMenuItem;
|
|
11
15
|
title: string;
|
|
@@ -14,6 +18,8 @@ export declare const ZyMegaMenu: import("../utils/withInstall").SFCWithInstall<{
|
|
|
14
18
|
}) => any) | undefined;
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
"update:open": (value: string | null) => any;
|
|
21
|
+
"update:active": (value: string | null) => any;
|
|
22
|
+
"update:activeLink": (value: string | null) => any;
|
|
17
23
|
navigate: (payload: {
|
|
18
24
|
item: import("./types").MegaMenuItem;
|
|
19
25
|
title: string;
|
|
@@ -34,10 +40,14 @@ export declare const ZyMegaMenu: import("../utils/withInstall").SFCWithInstall<{
|
|
|
34
40
|
}, Readonly<{
|
|
35
41
|
items?: import("./types").MegaMenuItem[];
|
|
36
42
|
open?: string | null;
|
|
43
|
+
active?: string | null;
|
|
44
|
+
activeLink?: string | null;
|
|
37
45
|
label?: string;
|
|
38
46
|
brand?: import("./types").MegaMenuBrand | null;
|
|
39
47
|
}> & Readonly<{
|
|
40
48
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
49
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
50
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
41
51
|
onNavigate?: ((payload: {
|
|
42
52
|
item: import("./types").MegaMenuItem;
|
|
43
53
|
title: string;
|
|
@@ -55,10 +65,14 @@ export declare const ZyMegaMenu: import("../utils/withInstall").SFCWithInstall<{
|
|
|
55
65
|
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
56
66
|
items?: import("./types").MegaMenuItem[];
|
|
57
67
|
open?: string | null;
|
|
68
|
+
active?: string | null;
|
|
69
|
+
activeLink?: string | null;
|
|
58
70
|
label?: string;
|
|
59
71
|
brand?: import("./types").MegaMenuBrand | null;
|
|
60
72
|
}> & Readonly<{
|
|
61
73
|
"onUpdate:open"?: ((value: string | null) => any) | undefined;
|
|
74
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
75
|
+
"onUpdate:activeLink"?: ((value: string | null) => any) | undefined;
|
|
62
76
|
onNavigate?: ((payload: {
|
|
63
77
|
item: import("./types").MegaMenuItem;
|
|
64
78
|
title: string;
|
|
@@ -67,6 +81,8 @@ export declare const ZyMegaMenu: import("../utils/withInstall").SFCWithInstall<{
|
|
|
67
81
|
}) => any) | undefined;
|
|
68
82
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
83
|
"update:open": (value: string | null) => any;
|
|
84
|
+
"update:active": (value: string | null) => any;
|
|
85
|
+
"update:activeLink": (value: string | null) => any;
|
|
70
86
|
navigate: (payload: {
|
|
71
87
|
item: import("./types").MegaMenuItem;
|
|
72
88
|
title: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
/** 图标:本库图标名(`src/assets/icons` 的文件名)或任意组件 */
|
|
3
3
|
export type MegaMenuIcon = string | Component;
|
|
4
|
-
/**
|
|
4
|
+
/** 面板里的一个大块(自适应列网格 / 单列列表) */
|
|
5
5
|
export interface MegaMenuLink {
|
|
6
6
|
title: string;
|
|
7
7
|
desc?: string;
|
|
@@ -33,8 +33,8 @@ export interface MegaMenuCard {
|
|
|
33
33
|
/** 面板:三种布局覆盖常见的大菜单 */
|
|
34
34
|
export interface MegaMenuPanel {
|
|
35
35
|
/**
|
|
36
|
-
* grid =
|
|
37
|
-
* groups = 左引导卡 + 右分组(资源那类)
|
|
36
|
+
* grid = 按子项数量自动 1 / 2 / 3 列的图文网格(1–4 单列,5–12 双列,≥13 三列;无 links 的自定义插槽保留双列)·
|
|
37
|
+
* list = 单列大块(场景那类)· groups = 左引导卡 + 右分组(资源那类)
|
|
38
38
|
*/
|
|
39
39
|
layout?: 'grid' | 'list' | 'groups';
|
|
40
40
|
links?: MegaMenuLink[];
|
|
@@ -48,7 +48,7 @@ export interface MegaMenuPanel {
|
|
|
48
48
|
href?: string;
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
/** 面板宽度(px
|
|
51
|
+
/** 面板宽度(px);缺省 grid 按列数 360 / 620 / 840,list 380,groups 600 */
|
|
52
52
|
width?: number;
|
|
53
53
|
/** 面板相对触发器的左偏移(px),缺省 groups 为 -150、其余 0 */
|
|
54
54
|
offset?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ZyTreeNode, ZyTreeProps } from './types';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
/** 承载的聚焦动效:focus 聚焦光环 / underline 下划线扫过 / gradient 渐变光晕 */
|
|
3
4
|
effect?: 'focus' | 'underline' | 'gradient';
|
|
@@ -7,16 +8,34 @@ type __VLS_Props = {
|
|
|
7
8
|
placeholder?: string;
|
|
8
9
|
clearable?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
11
|
+
/** 树形选择:用 data / treeProps / nodeKey 渲染树,multiple 时默认显示复选框 */
|
|
12
|
+
tree?: boolean;
|
|
13
|
+
/** 树数据 */
|
|
14
|
+
data?: ZyTreeNode[];
|
|
15
|
+
/** 树节点字段映射,默认 { label: 'label', children: 'children' } */
|
|
16
|
+
treeProps?: ZyTreeProps;
|
|
17
|
+
/** 节点唯一键字段,缺省 value */
|
|
18
|
+
nodeKey?: string;
|
|
19
|
+
/** 多选时是否显示复选框;缺省 multiple 时为 true */
|
|
20
|
+
showCheckbox?: boolean;
|
|
21
|
+
/** 父子节点不联动 */
|
|
22
|
+
checkStrictly?: boolean;
|
|
23
|
+
/** 默认展开全部节点 */
|
|
24
|
+
defaultExpandAll?: boolean;
|
|
25
|
+
/** 展开后再渲染子节点 */
|
|
26
|
+
renderAfterExpand?: boolean;
|
|
10
27
|
};
|
|
11
28
|
type __VLS_ModelProps = {
|
|
12
29
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
13
30
|
};
|
|
14
31
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
-
declare var __VLS_12: string, __VLS_13: any,
|
|
32
|
+
declare var __VLS_12: string, __VLS_13: any, __VLS_26: string, __VLS_27: any, __VLS_29: {};
|
|
16
33
|
type __VLS_Slots = {} & {
|
|
17
34
|
[K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
|
|
18
35
|
} & {
|
|
19
|
-
|
|
36
|
+
[K in NonNullable<typeof __VLS_26>]?: (props: typeof __VLS_27) => any;
|
|
37
|
+
} & {
|
|
38
|
+
default?: (props: typeof __VLS_29) => any;
|
|
20
39
|
};
|
|
21
40
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
41
|
"update:modelValue": (value: string | number | (string | number)[] | undefined) => any;
|
|
@@ -25,10 +44,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
25
44
|
}>, {
|
|
26
45
|
size: "large" | "default" | "small";
|
|
27
46
|
effect: "focus" | "underline" | "gradient";
|
|
47
|
+
data: ZyTreeNode[];
|
|
28
48
|
disabled: boolean;
|
|
29
49
|
placeholder: string;
|
|
30
50
|
clearable: boolean;
|
|
31
51
|
raised: boolean;
|
|
52
|
+
tree: boolean;
|
|
53
|
+
treeProps: ZyTreeProps;
|
|
54
|
+
nodeKey: string;
|
|
55
|
+
showCheckbox: boolean;
|
|
56
|
+
checkStrictly: boolean;
|
|
57
|
+
defaultExpandAll: boolean;
|
|
58
|
+
renderAfterExpand: boolean;
|
|
32
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
60
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
61
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,6 +6,14 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
clearable?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
tree?: boolean;
|
|
10
|
+
data?: import("./types").ZyTreeNode[];
|
|
11
|
+
treeProps?: import("./types").ZyTreeProps;
|
|
12
|
+
nodeKey?: string;
|
|
13
|
+
showCheckbox?: boolean;
|
|
14
|
+
checkStrictly?: boolean;
|
|
15
|
+
defaultExpandAll?: boolean;
|
|
16
|
+
renderAfterExpand?: boolean;
|
|
9
17
|
} & {
|
|
10
18
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
11
19
|
}> & Readonly<{
|
|
@@ -15,10 +23,18 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
15
23
|
}, import("vue").PublicProps, {
|
|
16
24
|
size: "large" | "default" | "small";
|
|
17
25
|
effect: "focus" | "underline" | "gradient";
|
|
26
|
+
data: import("./types").ZyTreeNode[];
|
|
18
27
|
disabled: boolean;
|
|
19
28
|
placeholder: string;
|
|
20
29
|
clearable: boolean;
|
|
21
30
|
raised: boolean;
|
|
31
|
+
tree: boolean;
|
|
32
|
+
treeProps: import("./types").ZyTreeProps;
|
|
33
|
+
nodeKey: string;
|
|
34
|
+
showCheckbox: boolean;
|
|
35
|
+
checkStrictly: boolean;
|
|
36
|
+
defaultExpandAll: boolean;
|
|
37
|
+
renderAfterExpand: boolean;
|
|
22
38
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
23
39
|
P: {};
|
|
24
40
|
B: {};
|
|
@@ -33,6 +49,14 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
33
49
|
placeholder?: string;
|
|
34
50
|
clearable?: boolean;
|
|
35
51
|
disabled?: boolean;
|
|
52
|
+
tree?: boolean;
|
|
53
|
+
data?: import("./types").ZyTreeNode[];
|
|
54
|
+
treeProps?: import("./types").ZyTreeProps;
|
|
55
|
+
nodeKey?: string;
|
|
56
|
+
showCheckbox?: boolean;
|
|
57
|
+
checkStrictly?: boolean;
|
|
58
|
+
defaultExpandAll?: boolean;
|
|
59
|
+
renderAfterExpand?: boolean;
|
|
36
60
|
} & {
|
|
37
61
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
38
62
|
}> & Readonly<{
|
|
@@ -40,10 +64,18 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
40
64
|
}>, {}, {}, {}, {}, {
|
|
41
65
|
size: "large" | "default" | "small";
|
|
42
66
|
effect: "focus" | "underline" | "gradient";
|
|
67
|
+
data: import("./types").ZyTreeNode[];
|
|
43
68
|
disabled: boolean;
|
|
44
69
|
placeholder: string;
|
|
45
70
|
clearable: boolean;
|
|
46
71
|
raised: boolean;
|
|
72
|
+
tree: boolean;
|
|
73
|
+
treeProps: import("./types").ZyTreeProps;
|
|
74
|
+
nodeKey: string;
|
|
75
|
+
showCheckbox: boolean;
|
|
76
|
+
checkStrictly: boolean;
|
|
77
|
+
defaultExpandAll: boolean;
|
|
78
|
+
renderAfterExpand: boolean;
|
|
47
79
|
}>;
|
|
48
80
|
__isFragment?: never;
|
|
49
81
|
__isTeleport?: never;
|
|
@@ -55,6 +87,14 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
55
87
|
placeholder?: string;
|
|
56
88
|
clearable?: boolean;
|
|
57
89
|
disabled?: boolean;
|
|
90
|
+
tree?: boolean;
|
|
91
|
+
data?: import("./types").ZyTreeNode[];
|
|
92
|
+
treeProps?: import("./types").ZyTreeProps;
|
|
93
|
+
nodeKey?: string;
|
|
94
|
+
showCheckbox?: boolean;
|
|
95
|
+
checkStrictly?: boolean;
|
|
96
|
+
defaultExpandAll?: boolean;
|
|
97
|
+
renderAfterExpand?: boolean;
|
|
58
98
|
} & {
|
|
59
99
|
modelValue?: string | number | undefined | Array<string | number>;
|
|
60
100
|
}> & Readonly<{
|
|
@@ -64,15 +104,26 @@ export declare const ZySelect: import("../utils/withInstall").SFCWithInstall<{
|
|
|
64
104
|
}, string, {
|
|
65
105
|
size: "large" | "default" | "small";
|
|
66
106
|
effect: "focus" | "underline" | "gradient";
|
|
107
|
+
data: import("./types").ZyTreeNode[];
|
|
67
108
|
disabled: boolean;
|
|
68
109
|
placeholder: string;
|
|
69
110
|
clearable: boolean;
|
|
70
111
|
raised: boolean;
|
|
112
|
+
tree: boolean;
|
|
113
|
+
treeProps: import("./types").ZyTreeProps;
|
|
114
|
+
nodeKey: string;
|
|
115
|
+
showCheckbox: boolean;
|
|
116
|
+
checkStrictly: boolean;
|
|
117
|
+
defaultExpandAll: boolean;
|
|
118
|
+
renderAfterExpand: boolean;
|
|
71
119
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
72
120
|
$slots: {
|
|
73
121
|
[x: string]: ((props: any) => any) | undefined;
|
|
122
|
+
} & {
|
|
123
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
74
124
|
} & {
|
|
75
125
|
default?: (props: {}) => any;
|
|
76
126
|
};
|
|
77
127
|
})>;
|
|
128
|
+
export type { ZyTreeNode, ZyTreeProps } from './types';
|
|
78
129
|
export default ZySelect;
|
|
@@ -484,8 +484,10 @@ html[data-zy-theme='basic'] .zy-mega-menu__plain {
|
|
|
484
484
|
border-radius: var(--zy-radius-sm) var(--zy-radius-sm) 0 0;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
/* 悬停与选中共用同一套底色:选中态常亮,指针离开也留着 */
|
|
487
488
|
html[data-zy-theme='basic'] .zy-mega-menu__trigger:hover,
|
|
488
|
-
html[data-zy-theme='basic'] .zy-mega-menu__plain:hover
|
|
489
|
+
html[data-zy-theme='basic'] .zy-mega-menu__plain:hover,
|
|
490
|
+
html[data-zy-theme='basic'] .zy-mega-menu__trigger.is-current {
|
|
489
491
|
background: var(--zy-mm-sunken);
|
|
490
492
|
}
|
|
491
493
|
|
|
@@ -501,7 +503,10 @@ html[data-zy-theme='basic'] .zy-mega-menu__panel {
|
|
|
501
503
|
box-shadow: var(--zy-shadow-float);
|
|
502
504
|
}
|
|
503
505
|
|
|
504
|
-
|
|
506
|
+
/* 滑行高亮与二级选中态共用一层皮:选中的那条一直亮着 */
|
|
507
|
+
html[data-zy-theme='basic'] .zy-mega-menu__glide,
|
|
508
|
+
html[data-zy-theme='basic'] .zy-mega-menu__link.is-current,
|
|
509
|
+
html[data-zy-theme='basic'] .zy-mega-menu__group-link.is-current {
|
|
505
510
|
border-radius: var(--zy-radius-sm);
|
|
506
511
|
background: var(--zy-mm-sunken);
|
|
507
512
|
/* 浅灰落在白纸片上也几乎看不见,按图纸语言补一道 1px 发丝边把它交代出来 */
|
|
@@ -16,6 +16,10 @@ html[data-zy-theme='solid']
|
|
|
16
16
|
.zy-pagination .el-pager li,
|
|
17
17
|
.zy-pagination button.btn-prev,
|
|
18
18
|
.zy-pagination button.btn-next,
|
|
19
|
+
.zy-mega-menu__trigger:hover,
|
|
20
|
+
.zy-mega-menu__plain:hover,
|
|
21
|
+
.zy-mega-menu__trigger.is-current,
|
|
22
|
+
.zy-mega-menu__plain.is-current,
|
|
19
23
|
.zy-mega-menu__trigger.is-open,
|
|
20
24
|
.zy-verify__piece,
|
|
21
25
|
.zy-verify__handle
|