straw-ui-vue 0.1.20 → 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 -146
- 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-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 +107 -51
- package/package.json +16 -11
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Switch 组件属性
|
|
5
|
-
* */
|
|
6
|
-
export interface StSwitchProps {
|
|
7
|
-
/** 自定义id,若不传递,则内置 */
|
|
8
|
-
id?: string;
|
|
9
|
-
/** 是否禁用 */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** 是否加载中 */
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
/** 打开时的值 */
|
|
14
|
-
trueValue?: boolean | string | number;
|
|
15
|
-
/** 关闭时的值 */
|
|
16
|
-
falseValue?: boolean | string | number;
|
|
17
|
-
/** 打开时的文字 */
|
|
18
|
-
trueText?: string;
|
|
19
|
-
/** 关闭时的文字 */
|
|
20
|
-
falseText?: string;
|
|
21
|
-
/** 标签类名 */
|
|
22
|
-
labelClass?: ClassValue;
|
|
23
|
-
/** 标签样式 */
|
|
24
|
-
labelStyle?: StyleValue;
|
|
25
|
-
/** 核心包裹层类名 */
|
|
26
|
-
boxClass?: ClassValue;
|
|
27
|
-
/** 核心包裹层眼视光 */
|
|
28
|
-
boxStyle?: StyleValue;
|
|
29
|
-
/** 核心区域类名 */
|
|
30
|
-
coreClass?: ClassValue;
|
|
31
|
-
/** 核心区域样式 */
|
|
32
|
-
coreStyle?: StyleValue;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Switch 组件事件类型
|
|
37
|
-
* */
|
|
38
|
-
export interface StSwitchEmits {
|
|
39
|
-
/** 值改变事件 */
|
|
40
|
-
change: [event: MouseEvent];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Switch 组件插槽类型
|
|
45
|
-
* */
|
|
46
|
-
export interface StSwitchSlots {
|
|
47
|
-
/** 打开状态插槽 */
|
|
48
|
-
trueAction?: () => unknown;
|
|
49
|
-
/** 关闭状态插槽 */
|
|
50
|
-
falseAction?: () => unknown;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export {};
|
|
1
|
+
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Switch 组件属性
|
|
5
|
+
* */
|
|
6
|
+
export interface StSwitchProps {
|
|
7
|
+
/** 自定义id,若不传递,则内置 */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** 是否禁用 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** 是否加载中 */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/** 打开时的值 */
|
|
14
|
+
trueValue?: boolean | string | number;
|
|
15
|
+
/** 关闭时的值 */
|
|
16
|
+
falseValue?: boolean | string | number;
|
|
17
|
+
/** 打开时的文字 */
|
|
18
|
+
trueText?: string;
|
|
19
|
+
/** 关闭时的文字 */
|
|
20
|
+
falseText?: string;
|
|
21
|
+
/** 标签类名 */
|
|
22
|
+
labelClass?: ClassValue;
|
|
23
|
+
/** 标签样式 */
|
|
24
|
+
labelStyle?: StyleValue;
|
|
25
|
+
/** 核心包裹层类名 */
|
|
26
|
+
boxClass?: ClassValue;
|
|
27
|
+
/** 核心包裹层眼视光 */
|
|
28
|
+
boxStyle?: StyleValue;
|
|
29
|
+
/** 核心区域类名 */
|
|
30
|
+
coreClass?: ClassValue;
|
|
31
|
+
/** 核心区域样式 */
|
|
32
|
+
coreStyle?: StyleValue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Switch 组件事件类型
|
|
37
|
+
* */
|
|
38
|
+
export interface StSwitchEmits {
|
|
39
|
+
/** 值改变事件 */
|
|
40
|
+
change: [event: MouseEvent];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Switch 组件插槽类型
|
|
45
|
+
* */
|
|
46
|
+
export interface StSwitchSlots {
|
|
47
|
+
/** 打开状态插槽 */
|
|
48
|
+
trueAction?: () => unknown;
|
|
49
|
+
/** 关闭状态插槽 */
|
|
50
|
+
falseAction?: () => unknown;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export {};
|
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
import type { ClassValue, Ref, StyleValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 标签页类型
|
|
5
|
-
* */
|
|
6
|
-
export type StTabsType = 'line' | 'card';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 标签页位置
|
|
10
|
-
* */
|
|
11
|
-
export type StTabsPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 标签页项信息
|
|
15
|
-
* */
|
|
16
|
-
export interface StTabsPaneInfo {
|
|
17
|
-
/** 标签页唯一标识 */
|
|
18
|
-
name: string;
|
|
19
|
-
/** 标签页标题 */
|
|
20
|
-
label: string;
|
|
21
|
-
/** 是否禁用 */
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
/** 是否可关闭 */
|
|
24
|
-
closable: boolean;
|
|
25
|
-
/** 标签页 DOM 元素 */
|
|
26
|
-
el: HTMLElement;
|
|
27
|
-
/** 标签项 class */
|
|
28
|
-
tabClass?: ClassValue;
|
|
29
|
-
/** 标签项 style */
|
|
30
|
-
tabStyle?: StyleValue;
|
|
31
|
-
/** 标签插槽内容 */
|
|
32
|
-
labelSlot?: unknown;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 标签页上下文
|
|
37
|
-
* */
|
|
38
|
-
export interface StTabsContext {
|
|
39
|
-
/** 当前激活的标签页 */
|
|
40
|
-
activeName: Ref<string>;
|
|
41
|
-
/** 注册标签页 */
|
|
42
|
-
registerPane: (info: StTabsPaneInfo) => void;
|
|
43
|
-
/** 注销标签页 */
|
|
44
|
-
unregisterPane: (name: string) => void;
|
|
45
|
-
/** 更新标签页 */
|
|
46
|
-
updatePane: (name: string, updates: Partial<StTabsPaneInfo>) => void;
|
|
47
|
-
/** 关闭标签页 */
|
|
48
|
-
closePane: (name: string) => void;
|
|
49
|
-
/** 标签页类型 */
|
|
50
|
-
type: Ref<StTabsType>;
|
|
51
|
-
/** 标签页位置 */
|
|
52
|
-
position: Ref<StTabsPosition>;
|
|
53
|
-
/** 是否可关闭 */
|
|
54
|
-
closable: Ref<boolean>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Tabs 组件属性接口
|
|
59
|
-
* */
|
|
60
|
-
export interface StTabsProps {
|
|
61
|
-
/** 当前激活的标签页 (v-model) */
|
|
62
|
-
modelValue?: string;
|
|
63
|
-
/** 标签页类型 */
|
|
64
|
-
type?: StTabsType;
|
|
65
|
-
/** 标签页位置 */
|
|
66
|
-
position?: StTabsPosition;
|
|
67
|
-
/** 是否可关闭 */
|
|
68
|
-
closable?: boolean;
|
|
69
|
-
/** 标签页容器 class */
|
|
70
|
-
navClass?: ClassValue;
|
|
71
|
-
/** 标签页容器 style */
|
|
72
|
-
navStyle?: StyleValue;
|
|
73
|
-
/** 内容区域 class */
|
|
74
|
-
contentClass?: ClassValue;
|
|
75
|
-
/** 内容区域 style */
|
|
76
|
-
contentStyle?: StyleValue;
|
|
77
|
-
/** 标签项 class */
|
|
78
|
-
tabClass?: ClassValue;
|
|
79
|
-
/** 标签项 style */
|
|
80
|
-
tabStyle?: StyleValue;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Tabs 组件事件接口
|
|
85
|
-
* */
|
|
86
|
-
export interface StTabsEmits {
|
|
87
|
-
/** 更新激活标签页事件 */
|
|
88
|
-
'update:modelValue': [name: string];
|
|
89
|
-
/** 标签页切换事件 */
|
|
90
|
-
change: [name: string];
|
|
91
|
-
/** 标签页关闭事件 */
|
|
92
|
-
close: [name: string];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Tabs 组件插槽接口
|
|
97
|
-
* */
|
|
98
|
-
export interface StTabsSlots {
|
|
99
|
-
/** 默认插槽(标签页内容) */
|
|
100
|
-
default?: () => unknown;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Tabs 组件暴露方法
|
|
105
|
-
* */
|
|
106
|
-
export interface StTabsExpose {
|
|
107
|
-
/** 当前激活的标签页 */
|
|
108
|
-
activeName: Ref<string>;
|
|
109
|
-
/** 切换到指定标签页 */
|
|
110
|
-
switchTo: (name: string) => void;
|
|
111
|
-
/** 关闭指定标签页 */
|
|
112
|
-
close: (name: string) => void;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* TabsPane 组件属性接口
|
|
117
|
-
* */
|
|
118
|
-
export interface StTabsPaneProps {
|
|
119
|
-
/** 标签页唯一标识 */
|
|
120
|
-
name: string;
|
|
121
|
-
/** 标签页标题 */
|
|
122
|
-
label?: string;
|
|
123
|
-
/** 是否禁用 */
|
|
124
|
-
disabled?: boolean;
|
|
125
|
-
/** 是否可关闭 */
|
|
126
|
-
closable?: boolean;
|
|
127
|
-
/** 标签页 class */
|
|
128
|
-
tabClass?: ClassValue;
|
|
129
|
-
/** 标签页 style */
|
|
130
|
-
tabStyle?: StyleValue;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* TabsPane 组件事件接口
|
|
135
|
-
* */
|
|
136
|
-
export interface StTabsPaneEmits {
|
|
137
|
-
/** 点击事件 */
|
|
138
|
-
click: [name: string];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* TabsPane 组件插槽接口
|
|
143
|
-
* */
|
|
144
|
-
export interface StTabsPaneSlots {
|
|
145
|
-
/** 标签页标题插槽 */
|
|
146
|
-
label?: () => unknown;
|
|
147
|
-
/** 默认插槽(标签页内容) */
|
|
148
|
-
default?: () => unknown;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export {};
|
|
1
|
+
import type { ClassValue, Ref, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 标签页类型
|
|
5
|
+
* */
|
|
6
|
+
export type StTabsType = 'line' | 'card';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 标签页位置
|
|
10
|
+
* */
|
|
11
|
+
export type StTabsPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 标签页项信息
|
|
15
|
+
* */
|
|
16
|
+
export interface StTabsPaneInfo {
|
|
17
|
+
/** 标签页唯一标识 */
|
|
18
|
+
name: string;
|
|
19
|
+
/** 标签页标题 */
|
|
20
|
+
label: string;
|
|
21
|
+
/** 是否禁用 */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** 是否可关闭 */
|
|
24
|
+
closable: boolean;
|
|
25
|
+
/** 标签页 DOM 元素 */
|
|
26
|
+
el: HTMLElement;
|
|
27
|
+
/** 标签项 class */
|
|
28
|
+
tabClass?: ClassValue;
|
|
29
|
+
/** 标签项 style */
|
|
30
|
+
tabStyle?: StyleValue;
|
|
31
|
+
/** 标签插槽内容 */
|
|
32
|
+
labelSlot?: unknown;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 标签页上下文
|
|
37
|
+
* */
|
|
38
|
+
export interface StTabsContext {
|
|
39
|
+
/** 当前激活的标签页 */
|
|
40
|
+
activeName: Ref<string>;
|
|
41
|
+
/** 注册标签页 */
|
|
42
|
+
registerPane: (info: StTabsPaneInfo) => void;
|
|
43
|
+
/** 注销标签页 */
|
|
44
|
+
unregisterPane: (name: string) => void;
|
|
45
|
+
/** 更新标签页 */
|
|
46
|
+
updatePane: (name: string, updates: Partial<StTabsPaneInfo>) => void;
|
|
47
|
+
/** 关闭标签页 */
|
|
48
|
+
closePane: (name: string) => void;
|
|
49
|
+
/** 标签页类型 */
|
|
50
|
+
type: Ref<StTabsType>;
|
|
51
|
+
/** 标签页位置 */
|
|
52
|
+
position: Ref<StTabsPosition>;
|
|
53
|
+
/** 是否可关闭 */
|
|
54
|
+
closable: Ref<boolean>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Tabs 组件属性接口
|
|
59
|
+
* */
|
|
60
|
+
export interface StTabsProps {
|
|
61
|
+
/** 当前激活的标签页 (v-model) */
|
|
62
|
+
modelValue?: string;
|
|
63
|
+
/** 标签页类型 */
|
|
64
|
+
type?: StTabsType;
|
|
65
|
+
/** 标签页位置 */
|
|
66
|
+
position?: StTabsPosition;
|
|
67
|
+
/** 是否可关闭 */
|
|
68
|
+
closable?: boolean;
|
|
69
|
+
/** 标签页容器 class */
|
|
70
|
+
navClass?: ClassValue;
|
|
71
|
+
/** 标签页容器 style */
|
|
72
|
+
navStyle?: StyleValue;
|
|
73
|
+
/** 内容区域 class */
|
|
74
|
+
contentClass?: ClassValue;
|
|
75
|
+
/** 内容区域 style */
|
|
76
|
+
contentStyle?: StyleValue;
|
|
77
|
+
/** 标签项 class */
|
|
78
|
+
tabClass?: ClassValue;
|
|
79
|
+
/** 标签项 style */
|
|
80
|
+
tabStyle?: StyleValue;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Tabs 组件事件接口
|
|
85
|
+
* */
|
|
86
|
+
export interface StTabsEmits {
|
|
87
|
+
/** 更新激活标签页事件 */
|
|
88
|
+
'update:modelValue': [name: string];
|
|
89
|
+
/** 标签页切换事件 */
|
|
90
|
+
change: [name: string];
|
|
91
|
+
/** 标签页关闭事件 */
|
|
92
|
+
close: [name: string];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Tabs 组件插槽接口
|
|
97
|
+
* */
|
|
98
|
+
export interface StTabsSlots {
|
|
99
|
+
/** 默认插槽(标签页内容) */
|
|
100
|
+
default?: () => unknown;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Tabs 组件暴露方法
|
|
105
|
+
* */
|
|
106
|
+
export interface StTabsExpose {
|
|
107
|
+
/** 当前激活的标签页 */
|
|
108
|
+
activeName: Ref<string>;
|
|
109
|
+
/** 切换到指定标签页 */
|
|
110
|
+
switchTo: (name: string) => void;
|
|
111
|
+
/** 关闭指定标签页 */
|
|
112
|
+
close: (name: string) => void;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* TabsPane 组件属性接口
|
|
117
|
+
* */
|
|
118
|
+
export interface StTabsPaneProps {
|
|
119
|
+
/** 标签页唯一标识 */
|
|
120
|
+
name: string;
|
|
121
|
+
/** 标签页标题 */
|
|
122
|
+
label?: string;
|
|
123
|
+
/** 是否禁用 */
|
|
124
|
+
disabled?: boolean;
|
|
125
|
+
/** 是否可关闭 */
|
|
126
|
+
closable?: boolean;
|
|
127
|
+
/** 标签页 class */
|
|
128
|
+
tabClass?: ClassValue;
|
|
129
|
+
/** 标签页 style */
|
|
130
|
+
tabStyle?: StyleValue;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* TabsPane 组件事件接口
|
|
135
|
+
* */
|
|
136
|
+
export interface StTabsPaneEmits {
|
|
137
|
+
/** 点击事件 */
|
|
138
|
+
click: [name: string];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* TabsPane 组件插槽接口
|
|
143
|
+
* */
|
|
144
|
+
export interface StTabsPaneSlots {
|
|
145
|
+
/** 标签页标题插槽 */
|
|
146
|
+
label?: () => unknown;
|
|
147
|
+
/** 默认插槽(标签页内容) */
|
|
148
|
+
default?: () => unknown;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export {};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Tag 标签类型
|
|
5
|
-
* */
|
|
6
|
-
export type StTagType = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'default';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Tag 标签变体
|
|
10
|
-
* */
|
|
11
|
-
export type StTagVariant = 'solid' | 'outline' | 'ghost';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Tag 组件属性
|
|
15
|
-
* */
|
|
16
|
-
export interface StTagProps {
|
|
17
|
-
/** 标签类型 */
|
|
18
|
-
type?: StTagType;
|
|
19
|
-
/** 标签变体 */
|
|
20
|
-
variant?: StTagVariant;
|
|
21
|
-
/** 是否可关闭 */
|
|
22
|
-
closable?: boolean;
|
|
23
|
-
/** 是否禁用 */
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
/** 自定义颜色 */
|
|
26
|
-
color?: string;
|
|
27
|
-
/** 关闭图标类名 */
|
|
28
|
-
closeIconClass?: ClassValue;
|
|
29
|
-
/** 关闭图标样式 */
|
|
30
|
-
closeIconStyle?: StyleValue;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Tag 组件插槽类型
|
|
35
|
-
* */
|
|
36
|
-
export interface StTagSlots {
|
|
37
|
-
/** 默认插槽 */
|
|
38
|
-
default?: () => unknown;
|
|
39
|
-
/** 关闭图标插槽 */
|
|
40
|
-
closeIcon?: () => unknown;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Tag 组件事件类型
|
|
45
|
-
* */
|
|
46
|
-
export interface StTagEmits {
|
|
47
|
-
/** 关闭事件 */
|
|
48
|
-
close: [event: MouseEvent];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export {};
|
|
1
|
+
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tag 标签类型
|
|
5
|
+
* */
|
|
6
|
+
export type StTagType = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'default';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Tag 标签变体
|
|
10
|
+
* */
|
|
11
|
+
export type StTagVariant = 'solid' | 'outline' | 'ghost';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Tag 组件属性
|
|
15
|
+
* */
|
|
16
|
+
export interface StTagProps {
|
|
17
|
+
/** 标签类型 */
|
|
18
|
+
type?: StTagType;
|
|
19
|
+
/** 标签变体 */
|
|
20
|
+
variant?: StTagVariant;
|
|
21
|
+
/** 是否可关闭 */
|
|
22
|
+
closable?: boolean;
|
|
23
|
+
/** 是否禁用 */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** 自定义颜色 */
|
|
26
|
+
color?: string;
|
|
27
|
+
/** 关闭图标类名 */
|
|
28
|
+
closeIconClass?: ClassValue;
|
|
29
|
+
/** 关闭图标样式 */
|
|
30
|
+
closeIconStyle?: StyleValue;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Tag 组件插槽类型
|
|
35
|
+
* */
|
|
36
|
+
export interface StTagSlots {
|
|
37
|
+
/** 默认插槽 */
|
|
38
|
+
default?: () => unknown;
|
|
39
|
+
/** 关闭图标插槽 */
|
|
40
|
+
closeIcon?: () => unknown;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Tag 组件事件类型
|
|
45
|
+
* */
|
|
46
|
+
export interface StTagEmits {
|
|
47
|
+
/** 关闭事件 */
|
|
48
|
+
close: [event: MouseEvent];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {};
|