straw-ui-vue 0.1.18 → 0.1.20
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 +0 -1
- package/dist/components/st-divider/context.d.ts +6 -0
- package/dist/components/st-divider/index.d.ts +61 -0
- package/dist/components/st-divider/st-divider-content.d.ts +11 -0
- package/dist/components/st-divider/st-divider-line.d.ts +11 -0
- package/dist/components/st-divider/types.d.ts +47 -1
- package/dist/components/st-select/types.d.ts +249 -249
- package/dist/index.d.ts +2 -0
- package/dist/straw-ui.js +601 -499
- package/dist/utils/device.d.ts +69 -0
- package/package.json +1 -1
- /package/dist/{utils/directive → directive}/index.d.ts +0 -0
- /package/dist/{utils/directive → directive}/types.d.ts +0 -0
- /package/dist/{utils/directive → directive}/v-intersection.d.ts +0 -0
- /package/dist/{utils/directive → directive}/v-resize.d.ts +0 -0
- /package/dist/utils/{utils/id.d.ts → id.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -24,6 +24,67 @@ export declare const StDivider: {
|
|
|
24
24
|
contentPosition: import('./types.d.ts').StDividerContentPosition;
|
|
25
25
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
26
26
|
$slots: import('./types.d.ts').StDividerSlots;
|
|
27
|
+
}) & {
|
|
28
|
+
StDividerLine: {
|
|
29
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
30
|
+
P: {};
|
|
31
|
+
B: {};
|
|
32
|
+
D: {};
|
|
33
|
+
C: {};
|
|
34
|
+
M: {};
|
|
35
|
+
Defaults: {};
|
|
36
|
+
}, Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
37
|
+
__isFragment?: never;
|
|
38
|
+
__isTeleport?: never;
|
|
39
|
+
__isSuspense?: never;
|
|
40
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
41
|
+
$slots: import('./types.d.ts').StDividerLineSlots;
|
|
42
|
+
});
|
|
43
|
+
StDividerContent: {
|
|
44
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
45
|
+
P: {};
|
|
46
|
+
B: {};
|
|
47
|
+
D: {};
|
|
48
|
+
C: {};
|
|
49
|
+
M: {};
|
|
50
|
+
Defaults: {};
|
|
51
|
+
}, Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
52
|
+
__isFragment?: never;
|
|
53
|
+
__isTeleport?: never;
|
|
54
|
+
__isSuspense?: never;
|
|
55
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
56
|
+
$slots: import('./types.d.ts').StDividerContentSlots;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
export declare const StDividerLine: {
|
|
60
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
61
|
+
P: {};
|
|
62
|
+
B: {};
|
|
63
|
+
D: {};
|
|
64
|
+
C: {};
|
|
65
|
+
M: {};
|
|
66
|
+
Defaults: {};
|
|
67
|
+
}, Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
68
|
+
__isFragment?: never;
|
|
69
|
+
__isTeleport?: never;
|
|
70
|
+
__isSuspense?: never;
|
|
71
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
72
|
+
$slots: import('./types.d.ts').StDividerLineSlots;
|
|
73
|
+
});
|
|
74
|
+
export declare const StDividerContent: {
|
|
75
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
76
|
+
P: {};
|
|
77
|
+
B: {};
|
|
78
|
+
D: {};
|
|
79
|
+
C: {};
|
|
80
|
+
M: {};
|
|
81
|
+
Defaults: {};
|
|
82
|
+
}, Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
83
|
+
__isFragment?: never;
|
|
84
|
+
__isTeleport?: never;
|
|
85
|
+
__isSuspense?: never;
|
|
86
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
87
|
+
$slots: import('./types.d.ts').StDividerContentSlots;
|
|
27
88
|
});
|
|
28
89
|
export default StDivider;
|
|
29
90
|
export type * from './types.d.ts';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StDividerContentProps, StDividerContentSlots } from './types.d.ts';
|
|
2
|
+
type __VLS_Slots = StDividerContentSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<StDividerContentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StDividerContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StDividerLineProps, StDividerLineSlots } from './types.d.ts';
|
|
2
|
+
type __VLS_Slots = StDividerLineSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<StDividerLineProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StDividerLineProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassValue, StyleValue } from 'vue';
|
|
1
|
+
import type { ClassValue, ComputedRef, StyleValue } from 'vue';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* 分割线方向类型
|
|
@@ -43,4 +43,50 @@ export interface StDividerSlots {
|
|
|
43
43
|
default?: () => unknown;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* 分割线组件事件类型
|
|
48
|
+
* */
|
|
49
|
+
export interface StDividerEmits {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 分割线 线组件属性
|
|
53
|
+
* */
|
|
54
|
+
export interface StDividerLineProps {}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 分割线 线组件插槽类型
|
|
58
|
+
* */
|
|
59
|
+
export interface StDividerLineSlots {}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 分割线 线组件事件类型
|
|
63
|
+
* */
|
|
64
|
+
export interface StDividerLineEmits {}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 分割线 文本组件属性
|
|
68
|
+
* */
|
|
69
|
+
export interface StDividerContentProps {}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 分割线 文本组件插槽类型
|
|
73
|
+
* */
|
|
74
|
+
export interface StDividerContentSlots {}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 分割线 文本组建事件类型
|
|
78
|
+
* */
|
|
79
|
+
export interface StDividerContentEmits {}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* StDivider 注入上下文接口
|
|
83
|
+
* 由 st-divider.vue 提供,供子组件注入获取共享状态
|
|
84
|
+
* */
|
|
85
|
+
export interface StDividerContext {
|
|
86
|
+
/** 分割线方向 */
|
|
87
|
+
readonly direction: ComputedRef<StDividerDirection>;
|
|
88
|
+
/** 分割线样式 */
|
|
89
|
+
readonly variant: ComputedRef<StDividerVariant>;
|
|
90
|
+
}
|
|
91
|
+
|
|
46
92
|
export {};
|
|
@@ -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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export { cn } from './utils/cn.ts';
|
|
|
45
45
|
export { withInstall, withInstallExtra } from './utils/with-install';
|
|
46
46
|
export type { SFCWithInstall, ExtractComponent, ComponentInstance } from './utils/with-install';
|
|
47
47
|
export { setZIndexBase, nextZIndex, getCurrentZIndex } from './utils/z-index.ts';
|
|
48
|
+
export { DeviceType, isMobile, isTablet, isPhone, isDesktop, getDeviceType, getDeviceInfo } from './utils/device.ts';
|
|
49
|
+
export type { DeviceInfo } from './utils/device.ts';
|
|
48
50
|
export type * from './components/st-button/types.d.ts';
|
|
49
51
|
export type * from './components/st-card/types.d.ts';
|
|
50
52
|
export type * from './components/st-cascade/types.d.ts';
|