straw-ui-vue 0.1.19 → 0.1.21
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/README.md +146 -147
- package/dist/{cn-CiflBmGp.js → cn-CThBjlvA.js} +7 -7
- package/dist/components/st-button/types.d.ts +63 -63
- package/dist/components/st-card/types.d.ts +184 -184
- package/dist/components/st-cascade/types.d.ts +156 -156
- package/dist/components/st-checkbox/types.d.ts +120 -120
- package/dist/components/st-color-picker/types.d.ts +160 -160
- package/dist/components/st-date-picker/types.d.ts +157 -157
- package/dist/components/st-datetime-picker/types.d.ts +155 -155
- package/dist/components/st-dialog/types.d.ts +293 -293
- package/dist/components/st-divider/types.d.ts +92 -92
- package/dist/components/st-drawer/types.d.ts +232 -232
- package/dist/components/st-empty/types.d.ts +39 -39
- package/dist/components/st-form-control/types.d.ts +21 -21
- package/dist/components/st-form-description/types.d.ts +21 -21
- package/dist/components/st-form-field/types.d.ts +64 -64
- package/dist/components/st-form-item/types.d.ts +21 -21
- package/dist/components/st-form-label/types.d.ts +19 -19
- package/dist/components/st-form-message/types.d.ts +23 -23
- package/dist/components/st-image/types.d.ts +58 -58
- package/dist/components/st-input/types.d.ts +415 -415
- package/dist/components/st-label/types.d.ts +19 -19
- package/dist/components/st-menu/types.d.ts +262 -262
- package/dist/components/st-pagination/types.d.ts +91 -91
- package/dist/components/st-popover/types.d.ts +202 -202
- package/dist/components/st-progress/types.d.ts +37 -37
- package/dist/components/st-radio/types.d.ts +126 -126
- package/dist/components/st-scrollbar/types.d.ts +62 -62
- package/dist/components/st-segmented/types.d.ts +53 -53
- package/dist/components/st-select/types.d.ts +249 -249
- package/dist/components/st-sidebar/types.d.ts +85 -85
- package/dist/components/st-sidebar-item/types.d.ts +45 -45
- package/dist/components/st-skeleton/types.d.ts +56 -56
- package/dist/components/st-slider/types.d.ts +61 -61
- package/dist/components/st-splitter/types.d.ts +260 -260
- package/dist/components/st-splitter-panel/types.d.ts +63 -63
- package/dist/components/st-switch/types.d.ts +53 -53
- package/dist/components/st-tabs/types.d.ts +151 -151
- package/dist/components/st-tag/types.d.ts +51 -51
- package/dist/components/st-time-picker/types.d.ts +143 -143
- package/dist/components/st-toggle/types.d.ts +58 -58
- package/dist/components/st-tooltip/types.d.ts +172 -172
- package/dist/components/st-tree/types.d.ts +188 -188
- package/dist/straw-ui.js +344 -254
- package/package.json +16 -11
|
@@ -1,249 +1,249 @@
|
|
|
1
|
-
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Select 选项数据结构
|
|
5
|
-
* */
|
|
6
|
-
export interface StSelectOption {
|
|
7
|
-
/** 显示文本 */
|
|
8
|
-
label: string;
|
|
9
|
-
/** 选项值 */
|
|
10
|
-
value: string | number;
|
|
11
|
-
/** 是否禁用 */
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
/** 子选项列表(用于分组) */
|
|
14
|
-
children?: StSelectOption[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Select 容器组件属性接口
|
|
19
|
-
* */
|
|
20
|
-
export interface StSelectContainerProps {
|
|
21
|
-
/** 绑定值 */
|
|
22
|
-
modelValue?: string | number | (string | number)[] | undefined;
|
|
23
|
-
/** 是否多选 */
|
|
24
|
-
multiple?: boolean;
|
|
25
|
-
/** 是否可筛选 */
|
|
26
|
-
filterable?: boolean;
|
|
27
|
-
/** 是否禁用 */
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Select 容器组件事件接口
|
|
33
|
-
* */
|
|
34
|
-
export interface StSelectContainerEmits {
|
|
35
|
-
/** 更新绑定值事件 */
|
|
36
|
-
'update:modelValue': [value: string | number | (string | number)[] | undefined];
|
|
37
|
-
/** 值改变事件 */
|
|
38
|
-
change: [value: string | number | (string | number)[] | undefined];
|
|
39
|
-
/** 清空事件 */
|
|
40
|
-
clear: [];
|
|
41
|
-
/** 下拉菜单显示状态改变事件 */
|
|
42
|
-
visibleChange: [visible: boolean];
|
|
43
|
-
/** 移除标签事件(多选模式) */
|
|
44
|
-
removeTag: [value: string | number];
|
|
45
|
-
/** 筛选事件 */
|
|
46
|
-
filter: [value: string];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Select 容器组件暴露的方法接口
|
|
51
|
-
* */
|
|
52
|
-
export interface StSelectContainerExpose {
|
|
53
|
-
/** 可见状态 */
|
|
54
|
-
visible: boolean;
|
|
55
|
-
/** 筛选文本 */
|
|
56
|
-
filterText: string;
|
|
57
|
-
/** 筛选聚焦状态 */
|
|
58
|
-
filterFocused: boolean;
|
|
59
|
-
/** 鼠标悬停状态 */
|
|
60
|
-
isHovered: boolean;
|
|
61
|
-
/** 触发器宽度 */
|
|
62
|
-
triggerWidth: number;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* SelectTrigger 触发器组件属性接口
|
|
67
|
-
* */
|
|
68
|
-
export interface StSelectTriggerProps {
|
|
69
|
-
/** 自定义类名 */
|
|
70
|
-
class?: ClassValue;
|
|
71
|
-
/** 自定义样式 */
|
|
72
|
-
style?: StyleValue;
|
|
73
|
-
/** 占位符 */
|
|
74
|
-
placeholder?: string;
|
|
75
|
-
/** 是否禁用 */
|
|
76
|
-
disabled?: boolean;
|
|
77
|
-
/** 是否可清空 */
|
|
78
|
-
clearable?: boolean;
|
|
79
|
-
/** 显示的值 */
|
|
80
|
-
displayValue?: string;
|
|
81
|
-
/** 是否显示清除图标 */
|
|
82
|
-
showClear?: boolean;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* SelectTrigger 触发器组件事件接口
|
|
87
|
-
* */
|
|
88
|
-
export interface StSelectTriggerEmits {
|
|
89
|
-
/** 清空事件 */
|
|
90
|
-
clear: [];
|
|
91
|
-
/** 点击事件 */
|
|
92
|
-
click: [event: MouseEvent];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* SelectTrigger 触发器组件暴露的方法接口
|
|
97
|
-
* */
|
|
98
|
-
export interface StSelectTriggerExpose {
|
|
99
|
-
/** 聚焦方法 */
|
|
100
|
-
focus: () => void;
|
|
101
|
-
/** 失焦方法 */
|
|
102
|
-
blur: () => void;
|
|
103
|
-
/** 元素引用 */
|
|
104
|
-
$el: any;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* SelectContent 内容组件属性接口
|
|
109
|
-
* */
|
|
110
|
-
export interface StSelectContentProps {
|
|
111
|
-
/** 自定义类名 */
|
|
112
|
-
class?: ClassValue;
|
|
113
|
-
/** 自定义样式 */
|
|
114
|
-
style?: StyleValue;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* SelectItem 选项组件属性接口
|
|
119
|
-
* */
|
|
120
|
-
export interface StSelectItemProps {
|
|
121
|
-
/** 自定义类名 */
|
|
122
|
-
class?: ClassValue;
|
|
123
|
-
/** 自定义样式 */
|
|
124
|
-
style?: StyleValue;
|
|
125
|
-
/** 选项值 */
|
|
126
|
-
value: string | number;
|
|
127
|
-
/** 显示文本 */
|
|
128
|
-
label?: string;
|
|
129
|
-
/** 是否禁用 */
|
|
130
|
-
disabled?: boolean;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* SelectGroup 分组组件属性接口
|
|
135
|
-
* */
|
|
136
|
-
export interface StSelectGroupProps {
|
|
137
|
-
/** 自定义类名 */
|
|
138
|
-
class?: ClassValue;
|
|
139
|
-
/** 自定义样式 */
|
|
140
|
-
style?: StyleValue;
|
|
141
|
-
/** 分组标签 */
|
|
142
|
-
label: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* SelectEmpty 空状态组件属性接口
|
|
147
|
-
* */
|
|
148
|
-
export interface StSelectEmptyProps {
|
|
149
|
-
/** 自定义类名 */
|
|
150
|
-
class?: ClassValue;
|
|
151
|
-
/** 自定义样式 */
|
|
152
|
-
style?: StyleValue;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* StSelect 封装组件属性接口(向后兼容)
|
|
157
|
-
* */
|
|
158
|
-
export interface StSelectProps {
|
|
159
|
-
/** 选项列表 */
|
|
160
|
-
list?: StSelectOption[];
|
|
161
|
-
/** 显示文本的字段名 */
|
|
162
|
-
labelKey?: string;
|
|
163
|
-
/** 值的字段名 */
|
|
164
|
-
valueKey?: string;
|
|
165
|
-
/** 占位符文本 */
|
|
166
|
-
placeholder?: string;
|
|
167
|
-
/** 是否禁用 */
|
|
168
|
-
disabled?: boolean;
|
|
169
|
-
/** 是否可清空 */
|
|
170
|
-
clearable?: boolean;
|
|
171
|
-
/** 是否多选 */
|
|
172
|
-
multiple?: boolean;
|
|
173
|
-
/** 是否可筛选 */
|
|
174
|
-
filterable?: boolean;
|
|
175
|
-
/** 是否分组 */
|
|
176
|
-
group?: boolean;
|
|
177
|
-
/** popover 下拉菜单的类名 */
|
|
178
|
-
popoverClass?: ClassValue;
|
|
179
|
-
/** popover 下拉菜单的样式 */
|
|
180
|
-
popoverStyle?: StyleValue;
|
|
181
|
-
/** 触发元素的类名 */
|
|
182
|
-
triggerClass?: ClassValue;
|
|
183
|
-
/** 触发元素的样式 */
|
|
184
|
-
triggerStyle?: StyleValue;
|
|
185
|
-
/** 下拉容器的类名 */
|
|
186
|
-
dropdownClass?: ClassValue;
|
|
187
|
-
/** 下拉容器的样式 */
|
|
188
|
-
dropdownStyle?: StyleValue;
|
|
189
|
-
/** 内容区域的类名 */
|
|
190
|
-
contentClass?: ClassValue;
|
|
191
|
-
/** 内容区域的样式 */
|
|
192
|
-
contentStyle?: StyleValue;
|
|
193
|
-
/** 选项的类名 */
|
|
194
|
-
optionClass?: ClassValue;
|
|
195
|
-
/** 选项的样式 */
|
|
196
|
-
optionStyle?: StyleValue;
|
|
197
|
-
/** 分组标签的类名 */
|
|
198
|
-
groupLabelClass?: ClassValue;
|
|
199
|
-
/** 分组标签的样式 */
|
|
200
|
-
groupLabelStyle?: StyleValue;
|
|
201
|
-
/** 空状态的类名 */
|
|
202
|
-
emptyClass?: ClassValue;
|
|
203
|
-
/** 空状态的样式 */
|
|
204
|
-
emptyStyle?: StyleValue;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* StSelect 封装组件事件接口
|
|
209
|
-
* */
|
|
210
|
-
export interface StSelectEmits {
|
|
211
|
-
/** 更新绑定值事件 */
|
|
212
|
-
'update:modelValue': [value: string | number | (string | number)[] | undefined];
|
|
213
|
-
/** 值改变事件 */
|
|
214
|
-
change: [value: string | number | (string | number)[] | undefined];
|
|
215
|
-
/** 清空事件 */
|
|
216
|
-
clear: [];
|
|
217
|
-
/** 下拉菜单显示状态改变事件 */
|
|
218
|
-
visibleChange: [visible: boolean];
|
|
219
|
-
/** 移除标签事件(多选模式) */
|
|
220
|
-
removeTag: [value: string | number];
|
|
221
|
-
/** 筛选事件 */
|
|
222
|
-
filter: [value: string];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* StSelect 封装组件插槽接口
|
|
227
|
-
* */
|
|
228
|
-
export interface StSelectSlots {
|
|
229
|
-
/** 默认插槽 */
|
|
230
|
-
default?: () => unknown;
|
|
231
|
-
/** 空状态插槽 */
|
|
232
|
-
empty?: () => unknown;
|
|
233
|
-
/** 前缀插槽 */
|
|
234
|
-
prefix?: () => unknown;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* StSelect 封装组件暴露的方法接口
|
|
239
|
-
* */
|
|
240
|
-
export interface StSelectExpose {
|
|
241
|
-
/** 聚焦方法 */
|
|
242
|
-
focus: () => void;
|
|
243
|
-
/** 失焦方法 */
|
|
244
|
-
blur: () => void;
|
|
245
|
-
/** 清空方法 */
|
|
246
|
-
clear: () => void;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export {};
|
|
1
|
+
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Select 选项数据结构
|
|
5
|
+
* */
|
|
6
|
+
export interface StSelectOption {
|
|
7
|
+
/** 显示文本 */
|
|
8
|
+
label: string;
|
|
9
|
+
/** 选项值 */
|
|
10
|
+
value: string | number;
|
|
11
|
+
/** 是否禁用 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** 子选项列表(用于分组) */
|
|
14
|
+
children?: StSelectOption[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Select 容器组件属性接口
|
|
19
|
+
* */
|
|
20
|
+
export interface StSelectContainerProps {
|
|
21
|
+
/** 绑定值 */
|
|
22
|
+
modelValue?: string | number | (string | number)[] | undefined;
|
|
23
|
+
/** 是否多选 */
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
/** 是否可筛选 */
|
|
26
|
+
filterable?: boolean;
|
|
27
|
+
/** 是否禁用 */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Select 容器组件事件接口
|
|
33
|
+
* */
|
|
34
|
+
export interface StSelectContainerEmits {
|
|
35
|
+
/** 更新绑定值事件 */
|
|
36
|
+
'update:modelValue': [value: string | number | (string | number)[] | undefined];
|
|
37
|
+
/** 值改变事件 */
|
|
38
|
+
change: [value: string | number | (string | number)[] | undefined];
|
|
39
|
+
/** 清空事件 */
|
|
40
|
+
clear: [];
|
|
41
|
+
/** 下拉菜单显示状态改变事件 */
|
|
42
|
+
visibleChange: [visible: boolean];
|
|
43
|
+
/** 移除标签事件(多选模式) */
|
|
44
|
+
removeTag: [value: string | number];
|
|
45
|
+
/** 筛选事件 */
|
|
46
|
+
filter: [value: string];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Select 容器组件暴露的方法接口
|
|
51
|
+
* */
|
|
52
|
+
export interface StSelectContainerExpose {
|
|
53
|
+
/** 可见状态 */
|
|
54
|
+
visible: boolean;
|
|
55
|
+
/** 筛选文本 */
|
|
56
|
+
filterText: string;
|
|
57
|
+
/** 筛选聚焦状态 */
|
|
58
|
+
filterFocused: boolean;
|
|
59
|
+
/** 鼠标悬停状态 */
|
|
60
|
+
isHovered: boolean;
|
|
61
|
+
/** 触发器宽度 */
|
|
62
|
+
triggerWidth: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* SelectTrigger 触发器组件属性接口
|
|
67
|
+
* */
|
|
68
|
+
export interface StSelectTriggerProps {
|
|
69
|
+
/** 自定义类名 */
|
|
70
|
+
class?: ClassValue;
|
|
71
|
+
/** 自定义样式 */
|
|
72
|
+
style?: StyleValue;
|
|
73
|
+
/** 占位符 */
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
/** 是否禁用 */
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
/** 是否可清空 */
|
|
78
|
+
clearable?: boolean;
|
|
79
|
+
/** 显示的值 */
|
|
80
|
+
displayValue?: string;
|
|
81
|
+
/** 是否显示清除图标 */
|
|
82
|
+
showClear?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* SelectTrigger 触发器组件事件接口
|
|
87
|
+
* */
|
|
88
|
+
export interface StSelectTriggerEmits {
|
|
89
|
+
/** 清空事件 */
|
|
90
|
+
clear: [];
|
|
91
|
+
/** 点击事件 */
|
|
92
|
+
click: [event: MouseEvent];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* SelectTrigger 触发器组件暴露的方法接口
|
|
97
|
+
* */
|
|
98
|
+
export interface StSelectTriggerExpose {
|
|
99
|
+
/** 聚焦方法 */
|
|
100
|
+
focus: () => void;
|
|
101
|
+
/** 失焦方法 */
|
|
102
|
+
blur: () => void;
|
|
103
|
+
/** 元素引用 */
|
|
104
|
+
$el: any;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* SelectContent 内容组件属性接口
|
|
109
|
+
* */
|
|
110
|
+
export interface StSelectContentProps {
|
|
111
|
+
/** 自定义类名 */
|
|
112
|
+
class?: ClassValue;
|
|
113
|
+
/** 自定义样式 */
|
|
114
|
+
style?: StyleValue;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* SelectItem 选项组件属性接口
|
|
119
|
+
* */
|
|
120
|
+
export interface StSelectItemProps {
|
|
121
|
+
/** 自定义类名 */
|
|
122
|
+
class?: ClassValue;
|
|
123
|
+
/** 自定义样式 */
|
|
124
|
+
style?: StyleValue;
|
|
125
|
+
/** 选项值 */
|
|
126
|
+
value: string | number;
|
|
127
|
+
/** 显示文本 */
|
|
128
|
+
label?: string;
|
|
129
|
+
/** 是否禁用 */
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* SelectGroup 分组组件属性接口
|
|
135
|
+
* */
|
|
136
|
+
export interface StSelectGroupProps {
|
|
137
|
+
/** 自定义类名 */
|
|
138
|
+
class?: ClassValue;
|
|
139
|
+
/** 自定义样式 */
|
|
140
|
+
style?: StyleValue;
|
|
141
|
+
/** 分组标签 */
|
|
142
|
+
label: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* SelectEmpty 空状态组件属性接口
|
|
147
|
+
* */
|
|
148
|
+
export interface StSelectEmptyProps {
|
|
149
|
+
/** 自定义类名 */
|
|
150
|
+
class?: ClassValue;
|
|
151
|
+
/** 自定义样式 */
|
|
152
|
+
style?: StyleValue;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* StSelect 封装组件属性接口(向后兼容)
|
|
157
|
+
* */
|
|
158
|
+
export interface StSelectProps {
|
|
159
|
+
/** 选项列表 */
|
|
160
|
+
list?: StSelectOption[];
|
|
161
|
+
/** 显示文本的字段名 */
|
|
162
|
+
labelKey?: string;
|
|
163
|
+
/** 值的字段名 */
|
|
164
|
+
valueKey?: string;
|
|
165
|
+
/** 占位符文本 */
|
|
166
|
+
placeholder?: string;
|
|
167
|
+
/** 是否禁用 */
|
|
168
|
+
disabled?: boolean;
|
|
169
|
+
/** 是否可清空 */
|
|
170
|
+
clearable?: boolean;
|
|
171
|
+
/** 是否多选 */
|
|
172
|
+
multiple?: boolean;
|
|
173
|
+
/** 是否可筛选 */
|
|
174
|
+
filterable?: boolean;
|
|
175
|
+
/** 是否分组 */
|
|
176
|
+
group?: boolean;
|
|
177
|
+
/** popover 下拉菜单的类名 */
|
|
178
|
+
popoverClass?: ClassValue;
|
|
179
|
+
/** popover 下拉菜单的样式 */
|
|
180
|
+
popoverStyle?: StyleValue;
|
|
181
|
+
/** 触发元素的类名 */
|
|
182
|
+
triggerClass?: ClassValue;
|
|
183
|
+
/** 触发元素的样式 */
|
|
184
|
+
triggerStyle?: StyleValue;
|
|
185
|
+
/** 下拉容器的类名 */
|
|
186
|
+
dropdownClass?: ClassValue;
|
|
187
|
+
/** 下拉容器的样式 */
|
|
188
|
+
dropdownStyle?: StyleValue;
|
|
189
|
+
/** 内容区域的类名 */
|
|
190
|
+
contentClass?: ClassValue;
|
|
191
|
+
/** 内容区域的样式 */
|
|
192
|
+
contentStyle?: StyleValue;
|
|
193
|
+
/** 选项的类名 */
|
|
194
|
+
optionClass?: ClassValue;
|
|
195
|
+
/** 选项的样式 */
|
|
196
|
+
optionStyle?: StyleValue;
|
|
197
|
+
/** 分组标签的类名 */
|
|
198
|
+
groupLabelClass?: ClassValue;
|
|
199
|
+
/** 分组标签的样式 */
|
|
200
|
+
groupLabelStyle?: StyleValue;
|
|
201
|
+
/** 空状态的类名 */
|
|
202
|
+
emptyClass?: ClassValue;
|
|
203
|
+
/** 空状态的样式 */
|
|
204
|
+
emptyStyle?: StyleValue;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* StSelect 封装组件事件接口
|
|
209
|
+
* */
|
|
210
|
+
export interface StSelectEmits {
|
|
211
|
+
/** 更新绑定值事件 */
|
|
212
|
+
'update:modelValue': [value: string | number | (string | number)[] | undefined];
|
|
213
|
+
/** 值改变事件 */
|
|
214
|
+
change: [value: string | number | (string | number)[] | undefined];
|
|
215
|
+
/** 清空事件 */
|
|
216
|
+
clear: [];
|
|
217
|
+
/** 下拉菜单显示状态改变事件 */
|
|
218
|
+
visibleChange: [visible: boolean];
|
|
219
|
+
/** 移除标签事件(多选模式) */
|
|
220
|
+
removeTag: [value: string | number];
|
|
221
|
+
/** 筛选事件 */
|
|
222
|
+
filter: [value: string];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* StSelect 封装组件插槽接口
|
|
227
|
+
* */
|
|
228
|
+
export interface StSelectSlots {
|
|
229
|
+
/** 默认插槽 */
|
|
230
|
+
default?: () => unknown;
|
|
231
|
+
/** 空状态插槽 */
|
|
232
|
+
empty?: () => unknown;
|
|
233
|
+
/** 前缀插槽 */
|
|
234
|
+
prefix?: () => unknown;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* StSelect 封装组件暴露的方法接口
|
|
239
|
+
* */
|
|
240
|
+
export interface StSelectExpose {
|
|
241
|
+
/** 聚焦方法 */
|
|
242
|
+
focus: () => void;
|
|
243
|
+
/** 失焦方法 */
|
|
244
|
+
blur: () => void;
|
|
245
|
+
/** 清空方法 */
|
|
246
|
+
clear: () => void;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export {};
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import type { ClassValue, Ref, StyleValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 侧边栏项信息
|
|
5
|
-
* */
|
|
6
|
-
export interface StSidebarItemInfo {
|
|
7
|
-
/** 项唯一标识 */
|
|
8
|
-
id: string;
|
|
9
|
-
/** 项标签文本 */
|
|
10
|
-
label: string;
|
|
11
|
-
/** 项标签HTML内容 */
|
|
12
|
-
labelHtml: string;
|
|
13
|
-
/** 项DOM元素 */
|
|
14
|
-
el: HTMLElement;
|
|
15
|
-
/** 项 class */
|
|
16
|
-
itemClass?: ClassValue;
|
|
17
|
-
/** 项 style */
|
|
18
|
-
itemStyle?: StyleValue;
|
|
19
|
-
/** 图标 HTML */
|
|
20
|
-
iconHtml?: string;
|
|
21
|
-
/** 图标 class */
|
|
22
|
-
iconClass?: ClassValue;
|
|
23
|
-
/** 图标 style */
|
|
24
|
-
iconStyle?: StyleValue;
|
|
25
|
-
/** 标签 class */
|
|
26
|
-
labelClass?: ClassValue;
|
|
27
|
-
/** 标签 style */
|
|
28
|
-
labelStyle?: StyleValue;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 侧边栏上下文
|
|
33
|
-
* */
|
|
34
|
-
export interface StSidebarContext {
|
|
35
|
-
/** 注册侧边栏项 */
|
|
36
|
-
registerItem: (info: StSidebarItemInfo) => void;
|
|
37
|
-
/** 注销侧边栏项 */
|
|
38
|
-
unregisterItem: (id: string) => void;
|
|
39
|
-
/** 更新侧边栏项标签 */
|
|
40
|
-
updateItemLabel: (id: string, label: string) => void;
|
|
41
|
-
/** 当前激活项ID */
|
|
42
|
-
activeId: Ref<string | null>;
|
|
43
|
-
/** 滚动到指定项 */
|
|
44
|
-
scrollToItem: (id: string) => void;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 侧边栏组件属性
|
|
49
|
-
* */
|
|
50
|
-
export interface StSidebarProps {
|
|
51
|
-
/** sidebar 容器 class */
|
|
52
|
-
sidebarClass?: ClassValue;
|
|
53
|
-
/** sidebar 容器 style */
|
|
54
|
-
sidebarStyle?: StyleValue;
|
|
55
|
-
/** sidebar 导航项 class */
|
|
56
|
-
itemClass?: ClassValue;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 侧边栏组件事件接口
|
|
61
|
-
* */
|
|
62
|
-
export interface StSidebarEmits {
|
|
63
|
-
/** 激活项改变事件 */
|
|
64
|
-
'update:activeId': [id: string | null];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 侧边栏组件插槽类型
|
|
69
|
-
* */
|
|
70
|
-
export interface StSidebarSlots {
|
|
71
|
-
/** 默认插槽 */
|
|
72
|
-
default?: () => unknown;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 侧边栏组件暴露方法
|
|
77
|
-
* */
|
|
78
|
-
export interface StSidebarExpose {
|
|
79
|
-
/** 滚动到指定项 */
|
|
80
|
-
scrollToItem: (id: string) => void;
|
|
81
|
-
/** 当前激活项ID */
|
|
82
|
-
activeId: Ref<string | null>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export {};
|
|
1
|
+
import type { ClassValue, Ref, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 侧边栏项信息
|
|
5
|
+
* */
|
|
6
|
+
export interface StSidebarItemInfo {
|
|
7
|
+
/** 项唯一标识 */
|
|
8
|
+
id: string;
|
|
9
|
+
/** 项标签文本 */
|
|
10
|
+
label: string;
|
|
11
|
+
/** 项标签HTML内容 */
|
|
12
|
+
labelHtml: string;
|
|
13
|
+
/** 项DOM元素 */
|
|
14
|
+
el: HTMLElement;
|
|
15
|
+
/** 项 class */
|
|
16
|
+
itemClass?: ClassValue;
|
|
17
|
+
/** 项 style */
|
|
18
|
+
itemStyle?: StyleValue;
|
|
19
|
+
/** 图标 HTML */
|
|
20
|
+
iconHtml?: string;
|
|
21
|
+
/** 图标 class */
|
|
22
|
+
iconClass?: ClassValue;
|
|
23
|
+
/** 图标 style */
|
|
24
|
+
iconStyle?: StyleValue;
|
|
25
|
+
/** 标签 class */
|
|
26
|
+
labelClass?: ClassValue;
|
|
27
|
+
/** 标签 style */
|
|
28
|
+
labelStyle?: StyleValue;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 侧边栏上下文
|
|
33
|
+
* */
|
|
34
|
+
export interface StSidebarContext {
|
|
35
|
+
/** 注册侧边栏项 */
|
|
36
|
+
registerItem: (info: StSidebarItemInfo) => void;
|
|
37
|
+
/** 注销侧边栏项 */
|
|
38
|
+
unregisterItem: (id: string) => void;
|
|
39
|
+
/** 更新侧边栏项标签 */
|
|
40
|
+
updateItemLabel: (id: string, label: string) => void;
|
|
41
|
+
/** 当前激活项ID */
|
|
42
|
+
activeId: Ref<string | null>;
|
|
43
|
+
/** 滚动到指定项 */
|
|
44
|
+
scrollToItem: (id: string) => void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 侧边栏组件属性
|
|
49
|
+
* */
|
|
50
|
+
export interface StSidebarProps {
|
|
51
|
+
/** sidebar 容器 class */
|
|
52
|
+
sidebarClass?: ClassValue;
|
|
53
|
+
/** sidebar 容器 style */
|
|
54
|
+
sidebarStyle?: StyleValue;
|
|
55
|
+
/** sidebar 导航项 class */
|
|
56
|
+
itemClass?: ClassValue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 侧边栏组件事件接口
|
|
61
|
+
* */
|
|
62
|
+
export interface StSidebarEmits {
|
|
63
|
+
/** 激活项改变事件 */
|
|
64
|
+
'update:activeId': [id: string | null];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 侧边栏组件插槽类型
|
|
69
|
+
* */
|
|
70
|
+
export interface StSidebarSlots {
|
|
71
|
+
/** 默认插槽 */
|
|
72
|
+
default?: () => unknown;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 侧边栏组件暴露方法
|
|
77
|
+
* */
|
|
78
|
+
export interface StSidebarExpose {
|
|
79
|
+
/** 滚动到指定项 */
|
|
80
|
+
scrollToItem: (id: string) => void;
|
|
81
|
+
/** 当前激活项ID */
|
|
82
|
+
activeId: Ref<string | null>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export {};
|