@bscjc/webui 1.5.0 → 1.6.1
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 +12 -11
- package/dist/components/JcInputTag/index.d.ts +219 -0
- package/dist/components/JcInputTag/index.vue.d.ts +131 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/es/index.mjs +1761 -1502
- package/dist/index.css +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/lib/index.cjs +9 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/components/JcInputTag/index.d.ts +714 -0
- package/dist/types/components/JcInputTag/index.vue.d.ts +1128 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
@bscjc/webui 是一个基于 Element Plus 的 Vue3 组件库,包含以下组件:
|
|
8
8
|
|
|
9
|
-
| 组件名 | 说明
|
|
10
|
-
| ------------------ |
|
|
11
|
-
| JcListLayout | 列表布局组件,支持自定义顶部和底部内容
|
|
12
|
-
| JcSelectQuery | 下拉选择器组件,支持多选、单选、搜索和全选功能
|
|
13
|
-
| JcDatePicker | 日期选择器组件,支持日期范围和月份范围选择
|
|
14
|
-
| JcInputSwitch | 输入切换组件,支持多字段切换输入
|
|
15
|
-
| JcInputComplex | 复杂输入切换组件,支持单行和多行文本输入
|
|
16
|
-
| JcTagQuery | 标签查询组件,用于展示和管理查询标签
|
|
17
|
-
| JcMoreQueryContain | 查询容器,用于包裹更多查询条件
|
|
18
|
-
| JcImportDialog | 导入弹窗组件,支持导入操作和下载模版
|
|
19
|
-
| JcImportButton | 导入按钮组件,支持导入操作
|
|
9
|
+
| 组件名 | 说明 |
|
|
10
|
+
| ------------------ | ------------------------------------------------ |
|
|
11
|
+
| JcListLayout | 列表布局组件,支持自定义顶部和底部内容 |
|
|
12
|
+
| JcSelectQuery | 下拉选择器组件,支持多选、单选、搜索和全选功能 |
|
|
13
|
+
| JcDatePicker | 日期选择器组件,支持日期范围和月份范围选择 |
|
|
14
|
+
| JcInputSwitch | 输入切换组件,支持多字段切换输入 |
|
|
15
|
+
| JcInputComplex | 复杂输入切换组件,支持单行和多行文本输入 |
|
|
16
|
+
| JcTagQuery | 标签查询组件,用于展示和管理查询标签 |
|
|
17
|
+
| JcMoreQueryContain | 查询容器,用于包裹更多查询条件 |
|
|
18
|
+
| JcImportDialog | 导入弹窗组件,支持导入操作和下载模版 |
|
|
19
|
+
| JcImportButton | 导入按钮组件,支持导入操作 |
|
|
20
|
+
| JcInputTag | 标签输入组件,支持多字段切换、数量限制和批量添加 |
|
|
20
21
|
|
|
21
22
|
## 安装使用说明
|
|
22
23
|
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export declare const JcInputTag: {
|
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./index.vue").Props> & Readonly<{
|
|
3
|
+
onClear?: ((payload: {
|
|
4
|
+
key: string;
|
|
5
|
+
}) => any) | undefined;
|
|
6
|
+
"onUpdate:modelValue"?: ((value: Record<string, string[]>) => any) | undefined;
|
|
7
|
+
onChange?: ((payload: {
|
|
8
|
+
key: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
}) => any) | undefined;
|
|
11
|
+
onAdd?: ((payload: {
|
|
12
|
+
key: string;
|
|
13
|
+
tag: string;
|
|
14
|
+
source: "enter" | "paste" | "bulk";
|
|
15
|
+
}) => any) | undefined;
|
|
16
|
+
onRemove?: ((payload: {
|
|
17
|
+
key: string;
|
|
18
|
+
tag: string;
|
|
19
|
+
}) => any) | undefined;
|
|
20
|
+
onExceed?: ((payload: {
|
|
21
|
+
key: string;
|
|
22
|
+
max: number;
|
|
23
|
+
attempted: string[];
|
|
24
|
+
}) => any) | undefined;
|
|
25
|
+
"onTab-change"?: ((payload: {
|
|
26
|
+
from: string;
|
|
27
|
+
to: string;
|
|
28
|
+
}) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
focus: () => void | undefined;
|
|
31
|
+
blur: () => void | undefined;
|
|
32
|
+
clear: () => void;
|
|
33
|
+
addTags: (tags: string[], source: "enter" | "paste" | "bulk") => void;
|
|
34
|
+
removeTag: (tag: string) => void;
|
|
35
|
+
activeKey: string;
|
|
36
|
+
setActiveKey: (key: string) => void;
|
|
37
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
clear: (payload: {
|
|
39
|
+
key: string;
|
|
40
|
+
}) => any;
|
|
41
|
+
"update:modelValue": (value: Record<string, string[]>) => any;
|
|
42
|
+
change: (payload: {
|
|
43
|
+
key: string;
|
|
44
|
+
tags: string[];
|
|
45
|
+
}) => any;
|
|
46
|
+
add: (payload: {
|
|
47
|
+
key: string;
|
|
48
|
+
tag: string;
|
|
49
|
+
source: "enter" | "paste" | "bulk";
|
|
50
|
+
}) => any;
|
|
51
|
+
remove: (payload: {
|
|
52
|
+
key: string;
|
|
53
|
+
tag: string;
|
|
54
|
+
}) => any;
|
|
55
|
+
exceed: (payload: {
|
|
56
|
+
key: string;
|
|
57
|
+
max: number;
|
|
58
|
+
attempted: string[];
|
|
59
|
+
}) => any;
|
|
60
|
+
"tab-change": (payload: {
|
|
61
|
+
from: string;
|
|
62
|
+
to: string;
|
|
63
|
+
}) => any;
|
|
64
|
+
}, import("vue").PublicProps, {
|
|
65
|
+
size: "small" | "default" | "large";
|
|
66
|
+
modelValue: Record<string, string[]>;
|
|
67
|
+
disabled: boolean;
|
|
68
|
+
clearable: boolean;
|
|
69
|
+
placeholder: string;
|
|
70
|
+
fields: import("./index.vue").InputTagFieldItem[];
|
|
71
|
+
maxTags: number;
|
|
72
|
+
bulkAdd: boolean;
|
|
73
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
74
|
+
P: {};
|
|
75
|
+
B: {};
|
|
76
|
+
D: {};
|
|
77
|
+
C: {};
|
|
78
|
+
M: {};
|
|
79
|
+
Defaults: {};
|
|
80
|
+
}, Readonly<import("./index.vue").Props> & Readonly<{
|
|
81
|
+
onClear?: ((payload: {
|
|
82
|
+
key: string;
|
|
83
|
+
}) => any) | undefined;
|
|
84
|
+
"onUpdate:modelValue"?: ((value: Record<string, string[]>) => any) | undefined;
|
|
85
|
+
onChange?: ((payload: {
|
|
86
|
+
key: string;
|
|
87
|
+
tags: string[];
|
|
88
|
+
}) => any) | undefined;
|
|
89
|
+
onAdd?: ((payload: {
|
|
90
|
+
key: string;
|
|
91
|
+
tag: string;
|
|
92
|
+
source: "enter" | "paste" | "bulk";
|
|
93
|
+
}) => any) | undefined;
|
|
94
|
+
onRemove?: ((payload: {
|
|
95
|
+
key: string;
|
|
96
|
+
tag: string;
|
|
97
|
+
}) => any) | undefined;
|
|
98
|
+
onExceed?: ((payload: {
|
|
99
|
+
key: string;
|
|
100
|
+
max: number;
|
|
101
|
+
attempted: string[];
|
|
102
|
+
}) => any) | undefined;
|
|
103
|
+
"onTab-change"?: ((payload: {
|
|
104
|
+
from: string;
|
|
105
|
+
to: string;
|
|
106
|
+
}) => any) | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
focus: () => void | undefined;
|
|
109
|
+
blur: () => void | undefined;
|
|
110
|
+
clear: () => void;
|
|
111
|
+
addTags: (tags: string[], source: "enter" | "paste" | "bulk") => void;
|
|
112
|
+
removeTag: (tag: string) => void;
|
|
113
|
+
activeKey: string;
|
|
114
|
+
setActiveKey: (key: string) => void;
|
|
115
|
+
}, {}, {}, {}, {
|
|
116
|
+
size: "small" | "default" | "large";
|
|
117
|
+
modelValue: Record<string, string[]>;
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
clearable: boolean;
|
|
120
|
+
placeholder: string;
|
|
121
|
+
fields: import("./index.vue").InputTagFieldItem[];
|
|
122
|
+
maxTags: number;
|
|
123
|
+
bulkAdd: boolean;
|
|
124
|
+
}>;
|
|
125
|
+
__isFragment?: never;
|
|
126
|
+
__isTeleport?: never;
|
|
127
|
+
__isSuspense?: never;
|
|
128
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./index.vue").Props> & Readonly<{
|
|
129
|
+
onClear?: ((payload: {
|
|
130
|
+
key: string;
|
|
131
|
+
}) => any) | undefined;
|
|
132
|
+
"onUpdate:modelValue"?: ((value: Record<string, string[]>) => any) | undefined;
|
|
133
|
+
onChange?: ((payload: {
|
|
134
|
+
key: string;
|
|
135
|
+
tags: string[];
|
|
136
|
+
}) => any) | undefined;
|
|
137
|
+
onAdd?: ((payload: {
|
|
138
|
+
key: string;
|
|
139
|
+
tag: string;
|
|
140
|
+
source: "enter" | "paste" | "bulk";
|
|
141
|
+
}) => any) | undefined;
|
|
142
|
+
onRemove?: ((payload: {
|
|
143
|
+
key: string;
|
|
144
|
+
tag: string;
|
|
145
|
+
}) => any) | undefined;
|
|
146
|
+
onExceed?: ((payload: {
|
|
147
|
+
key: string;
|
|
148
|
+
max: number;
|
|
149
|
+
attempted: string[];
|
|
150
|
+
}) => any) | undefined;
|
|
151
|
+
"onTab-change"?: ((payload: {
|
|
152
|
+
from: string;
|
|
153
|
+
to: string;
|
|
154
|
+
}) => any) | undefined;
|
|
155
|
+
}>, {
|
|
156
|
+
focus: () => void | undefined;
|
|
157
|
+
blur: () => void | undefined;
|
|
158
|
+
clear: () => void;
|
|
159
|
+
addTags: (tags: string[], source: "enter" | "paste" | "bulk") => void;
|
|
160
|
+
removeTag: (tag: string) => void;
|
|
161
|
+
activeKey: string;
|
|
162
|
+
setActiveKey: (key: string) => void;
|
|
163
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
164
|
+
clear: (payload: {
|
|
165
|
+
key: string;
|
|
166
|
+
}) => any;
|
|
167
|
+
"update:modelValue": (value: Record<string, string[]>) => any;
|
|
168
|
+
change: (payload: {
|
|
169
|
+
key: string;
|
|
170
|
+
tags: string[];
|
|
171
|
+
}) => any;
|
|
172
|
+
add: (payload: {
|
|
173
|
+
key: string;
|
|
174
|
+
tag: string;
|
|
175
|
+
source: "enter" | "paste" | "bulk";
|
|
176
|
+
}) => any;
|
|
177
|
+
remove: (payload: {
|
|
178
|
+
key: string;
|
|
179
|
+
tag: string;
|
|
180
|
+
}) => any;
|
|
181
|
+
exceed: (payload: {
|
|
182
|
+
key: string;
|
|
183
|
+
max: number;
|
|
184
|
+
attempted: string[];
|
|
185
|
+
}) => any;
|
|
186
|
+
"tab-change": (payload: {
|
|
187
|
+
from: string;
|
|
188
|
+
to: string;
|
|
189
|
+
}) => any;
|
|
190
|
+
}, string, {
|
|
191
|
+
size: "small" | "default" | "large";
|
|
192
|
+
modelValue: Record<string, string[]>;
|
|
193
|
+
disabled: boolean;
|
|
194
|
+
clearable: boolean;
|
|
195
|
+
placeholder: string;
|
|
196
|
+
fields: import("./index.vue").InputTagFieldItem[];
|
|
197
|
+
maxTags: number;
|
|
198
|
+
bulkAdd: boolean;
|
|
199
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
200
|
+
$slots: {
|
|
201
|
+
suffix?: (props: {
|
|
202
|
+
fieldKey: string;
|
|
203
|
+
tags: string[];
|
|
204
|
+
}) => any;
|
|
205
|
+
} & {
|
|
206
|
+
tag?: (props: {
|
|
207
|
+
key: string;
|
|
208
|
+
tag: string;
|
|
209
|
+
index: number;
|
|
210
|
+
fieldKey: string;
|
|
211
|
+
remove: () => void;
|
|
212
|
+
}) => any;
|
|
213
|
+
} & {
|
|
214
|
+
empty?: (props: {
|
|
215
|
+
fieldKey: string;
|
|
216
|
+
}) => any;
|
|
217
|
+
};
|
|
218
|
+
}) & import("vue").Plugin;
|
|
219
|
+
export default JcInputTag;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/** 字段配置项类型 */
|
|
2
|
+
export interface InputTagFieldItem {
|
|
3
|
+
/** 字段唯一标识 */
|
|
4
|
+
key: string;
|
|
5
|
+
/** 字段显示名称 */
|
|
6
|
+
label: string;
|
|
7
|
+
/** 字段专属占位符 */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** 字段专属上限(覆盖全局) */
|
|
10
|
+
maxTags?: number;
|
|
11
|
+
}
|
|
12
|
+
/** 组件 Props 类型 */
|
|
13
|
+
export interface Props {
|
|
14
|
+
/** v-model 绑定值 */
|
|
15
|
+
modelValue?: Record<string, string[]>;
|
|
16
|
+
/** 字段配置 */
|
|
17
|
+
fields?: InputTagFieldItem[];
|
|
18
|
+
/** 每字段最大标签数 */
|
|
19
|
+
maxTags?: number;
|
|
20
|
+
/** 输入框占位符 */
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/** 禁用状态 */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** 是否显示清空按钮 */
|
|
25
|
+
clearable?: boolean;
|
|
26
|
+
/** 是否启用批量添加 */
|
|
27
|
+
bulkAdd?: boolean;
|
|
28
|
+
/** 组件尺寸 */
|
|
29
|
+
size?: "small" | "default" | "large";
|
|
30
|
+
}
|
|
31
|
+
declare function addTags(tags: string[], source: "enter" | "paste" | "bulk"): void;
|
|
32
|
+
declare function removeTag(tag: string): void;
|
|
33
|
+
declare function clearTags(): void;
|
|
34
|
+
declare var __VLS_1: {
|
|
35
|
+
fieldKey: string;
|
|
36
|
+
tags: string[];
|
|
37
|
+
}, __VLS_11: {
|
|
38
|
+
key: string;
|
|
39
|
+
tag: string;
|
|
40
|
+
index: number;
|
|
41
|
+
fieldKey: string;
|
|
42
|
+
remove: () => void;
|
|
43
|
+
}, __VLS_21: {
|
|
44
|
+
fieldKey: string;
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Slots = {} & {
|
|
47
|
+
suffix?: (props: typeof __VLS_1) => any;
|
|
48
|
+
} & {
|
|
49
|
+
tag?: (props: typeof __VLS_11) => any;
|
|
50
|
+
} & {
|
|
51
|
+
empty?: (props: typeof __VLS_21) => any;
|
|
52
|
+
};
|
|
53
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
54
|
+
focus: () => void | undefined;
|
|
55
|
+
blur: () => void | undefined;
|
|
56
|
+
clear: typeof clearTags;
|
|
57
|
+
addTags: typeof addTags;
|
|
58
|
+
removeTag: typeof removeTag;
|
|
59
|
+
activeKey: string;
|
|
60
|
+
setActiveKey: (key: string) => void;
|
|
61
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
62
|
+
clear: (payload: {
|
|
63
|
+
key: string;
|
|
64
|
+
}) => any;
|
|
65
|
+
"update:modelValue": (value: Record<string, string[]>) => any;
|
|
66
|
+
change: (payload: {
|
|
67
|
+
key: string;
|
|
68
|
+
tags: string[];
|
|
69
|
+
}) => any;
|
|
70
|
+
add: (payload: {
|
|
71
|
+
key: string;
|
|
72
|
+
tag: string;
|
|
73
|
+
source: "enter" | "paste" | "bulk";
|
|
74
|
+
}) => any;
|
|
75
|
+
remove: (payload: {
|
|
76
|
+
key: string;
|
|
77
|
+
tag: string;
|
|
78
|
+
}) => any;
|
|
79
|
+
exceed: (payload: {
|
|
80
|
+
key: string;
|
|
81
|
+
max: number;
|
|
82
|
+
attempted: string[];
|
|
83
|
+
}) => any;
|
|
84
|
+
"tab-change": (payload: {
|
|
85
|
+
from: string;
|
|
86
|
+
to: string;
|
|
87
|
+
}) => any;
|
|
88
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
89
|
+
onClear?: ((payload: {
|
|
90
|
+
key: string;
|
|
91
|
+
}) => any) | undefined;
|
|
92
|
+
"onUpdate:modelValue"?: ((value: Record<string, string[]>) => any) | undefined;
|
|
93
|
+
onChange?: ((payload: {
|
|
94
|
+
key: string;
|
|
95
|
+
tags: string[];
|
|
96
|
+
}) => any) | undefined;
|
|
97
|
+
onAdd?: ((payload: {
|
|
98
|
+
key: string;
|
|
99
|
+
tag: string;
|
|
100
|
+
source: "enter" | "paste" | "bulk";
|
|
101
|
+
}) => any) | undefined;
|
|
102
|
+
onRemove?: ((payload: {
|
|
103
|
+
key: string;
|
|
104
|
+
tag: string;
|
|
105
|
+
}) => any) | undefined;
|
|
106
|
+
onExceed?: ((payload: {
|
|
107
|
+
key: string;
|
|
108
|
+
max: number;
|
|
109
|
+
attempted: string[];
|
|
110
|
+
}) => any) | undefined;
|
|
111
|
+
"onTab-change"?: ((payload: {
|
|
112
|
+
from: string;
|
|
113
|
+
to: string;
|
|
114
|
+
}) => any) | undefined;
|
|
115
|
+
}>, {
|
|
116
|
+
size: "small" | "default" | "large";
|
|
117
|
+
modelValue: Record<string, string[]>;
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
clearable: boolean;
|
|
120
|
+
placeholder: string;
|
|
121
|
+
fields: InputTagFieldItem[];
|
|
122
|
+
maxTags: number;
|
|
123
|
+
bulkAdd: boolean;
|
|
124
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
125
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
126
|
+
export default _default;
|
|
127
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
128
|
+
new (): {
|
|
129
|
+
$slots: S;
|
|
130
|
+
};
|
|
131
|
+
};
|