twcpt 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/README.md +33 -4
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.d.ts +0 -7
- package/dist/charts.es.js +1 -9
- package/dist/components/j-tw-btn/index.d.ts +51 -14
- package/dist/components/j-tw-btn/types.d.ts +19 -4
- package/dist/components/j-tw-checkbox/index.d.ts +230 -0
- package/dist/components/j-tw-checkbox/types.d.ts +35 -0
- package/dist/components/j-tw-checkbox-group/index.d.ts +309 -0
- package/dist/components/j-tw-checkbox-group/types.d.ts +38 -0
- package/dist/components/j-tw-confirm-dialog/index.d.ts +704 -0
- package/dist/components/j-tw-confirm-dialog/jwConfirmDialog.d.ts +2 -0
- package/dist/components/j-tw-confirm-dialog/types.d.ts +79 -0
- package/dist/components/j-tw-date-picker/index.d.ts +1645 -0
- package/dist/components/j-tw-date-picker/types.d.ts +162 -0
- package/dist/components/j-tw-dialog/index.d.ts +793 -0
- package/dist/components/j-tw-dialog/jwDialog.d.ts +38 -0
- package/dist/components/j-tw-dialog/types.d.ts +122 -0
- package/dist/components/j-tw-dropdown-btn/index.d.ts +3 -0
- package/dist/components/j-tw-dropdown-btn/types.d.ts +69 -0
- package/dist/components/j-tw-form/index.d.ts +368 -0
- package/dist/components/j-tw-form/types.d.ts +18 -0
- package/dist/components/j-tw-form-item/index.d.ts +248 -0
- package/dist/components/j-tw-form-item/types.d.ts +21 -0
- package/dist/components/j-tw-form-label/index.d.ts +66 -0
- package/dist/components/j-tw-input/index.d.ts +537 -0
- package/dist/components/j-tw-input/types.d.ts +76 -0
- package/dist/components/j-tw-messages/MessageItem.d.ts +84 -0
- package/dist/components/j-tw-messages/index.d.ts +110 -0
- package/dist/components/j-tw-messages/jwMessages.d.ts +2 -0
- package/dist/components/j-tw-messages/state.d.ts +23 -0
- package/dist/components/j-tw-messages/types.d.ts +31 -0
- package/dist/components/j-tw-radio/index.d.ts +168 -0
- package/dist/components/j-tw-radio/types.d.ts +29 -0
- package/dist/components/j-tw-radio-group/index.d.ts +244 -0
- package/dist/components/j-tw-radio-group/types.d.ts +37 -0
- package/dist/components/j-tw-status-img/index.d.ts +36 -0
- package/dist/components/j-tw-status-img/types.d.ts +3 -0
- package/dist/components/j-tw-table/index.d.ts +480 -0
- package/dist/components/j-tw-table/types.d.ts +157 -0
- package/dist/components/j-tw-tree-select/TreeNode.d.ts +124 -0
- package/dist/components/j-tw-tree-select/index.d.ts +292 -0
- package/dist/components/j-tw-tree-select/types.d.ts +110 -0
- package/dist/components/j-tw-tree-select-btn/TreeNode.d.ts +107 -0
- package/dist/components/j-tw-tree-select-btn/index.d.ts +1505 -0
- package/dist/components/j-tw-tree-select-btn/types.d.ts +104 -0
- package/dist/global.d.ts +128 -38
- package/dist/index.css +1 -1
- package/dist/index.d.ts +44 -8
- package/dist/shims-svg.d.ts +4 -0
- package/dist/twcpt-styles.css +1 -1
- package/dist/twcpt.cjs.js +12 -1
- package/dist/twcpt.es.js +4521 -1488
- package/dist/types.d.ts +1 -1
- package/dist/utils/init.d.ts +19 -0
- package/dist/utils/tool.d.ts +1 -1
- package/dist/utils/useBizRequest.d.ts +12 -0
- package/package.json +4 -4
- package/dist/charts-CKv8I1ye.js +0 -879
- package/dist/charts-DIdINgA4.cjs +0 -1
- package/dist/charts.css +0 -1
- package/dist/components/j-ch-bar/index.d.ts +0 -50
- package/dist/components/j-ch-bar/types.d.ts +0 -42
- package/dist/components/j-ch-bar-line/index.d.ts +0 -49
- package/dist/components/j-ch-bar-line/types.d.ts +0 -42
- package/dist/components/j-ch-bubble/index.d.ts +0 -54
- package/dist/components/j-ch-bubble/types.d.ts +0 -51
- package/dist/components/j-ch-line/index.d.ts +0 -57
- package/dist/components/j-ch-line/types.d.ts +0 -42
- package/dist/components/j-ch-pie-doughnut/index.d.ts +0 -60
- package/dist/components/j-ch-pie-doughnut/types.d.ts +0 -55
- package/dist/components/j-ch-radar/index.d.ts +0 -49
- package/dist/components/j-ch-radar/types.d.ts +0 -42
- package/dist/utils/chart.d.ts +0 -28
- package/dist/utils/website-config.d.ts +0 -15
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# TWCPT - Vue 3 + Element-plus 组件库
|
|
2
2
|
|
|
3
3
|
TWCPT 是一个基于 Vue 3、TypeScript 和 Element-plus 构建的现代企业级组件库。
|
|
4
4
|
|
|
@@ -102,18 +102,47 @@ yarn add twcpt
|
|
|
102
102
|
pnpm add twcpt
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
###
|
|
105
|
+
### 基础使用
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
import { createApp } from 'vue'
|
|
109
|
-
import
|
|
109
|
+
import { twcptInit } from 'twcpt'
|
|
110
110
|
import 'twcpt/dist/index.css'
|
|
111
111
|
|
|
112
112
|
const app = createApp(App)
|
|
113
|
-
|
|
113
|
+
|
|
114
|
+
// 初始化 TWCPT
|
|
115
|
+
twcptInit({
|
|
116
|
+
app,
|
|
117
|
+
defaultLanguage: 'zh-CN', // 可选:设置默认语言
|
|
118
|
+
colors: {
|
|
119
|
+
primary: '#FF5722', // 可选:自定义主题色
|
|
120
|
+
blue: '#2196F3'
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
|
|
114
124
|
app.mount('#app')
|
|
115
125
|
```
|
|
116
126
|
|
|
127
|
+
### 样式隔离
|
|
128
|
+
|
|
129
|
+
为了避免 TWCPT 的颜色配置影响外部项目,所有 TWCPT 组件必须包裹在 `.twcpt-container` 容器内:
|
|
130
|
+
|
|
131
|
+
```vue
|
|
132
|
+
<template>
|
|
133
|
+
<div class="twcpt-container">
|
|
134
|
+
<!-- TWCPT 组件只在此容器内生效 -->
|
|
135
|
+
<JTWButton type="primary">按钮</JTWButton>
|
|
136
|
+
<JTWTable :data="tableData" />
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**重要说明:**
|
|
142
|
+
- `.twcpt-container` 确保 TWCPT 的颜色变量不会影响外部项目
|
|
143
|
+
- 如果 A 项目引用了 B 组件(TWCPT),两者的颜色配置互不影响
|
|
144
|
+
- 每个使用 TWCPT 的区域都需要包裹 `.twcpt-container`
|
|
145
|
+
|
|
117
146
|
### 按需引入
|
|
118
147
|
|
|
119
148
|
```typescript
|
package/dist/charts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
package/dist/charts.d.ts
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { default as JChBar } from './components/j-ch-bar/index';
|
|
2
|
-
import { default as JChBarLine } from './components/j-ch-bar-line/index';
|
|
3
|
-
import { default as JChBubble } from './components/j-ch-bubble/index';
|
|
4
|
-
import { default as JChLine } from './components/j-ch-line/index';
|
|
5
|
-
import { default as JChPieDoughnut } from './components/j-ch-pie-doughnut/index';
|
|
6
|
-
import { default as JChRadar } from './components/j-ch-radar/index';
|
|
7
|
-
export { JChBar, JChBarLine, JChBubble, JChLine, JChPieDoughnut, JChRadar, };
|
package/dist/charts.es.js
CHANGED
|
@@ -8,14 +8,26 @@ import { Arrayable } from 'element-plus/es/utils/typescript.mjs';
|
|
|
8
8
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
9
9
|
size: {
|
|
10
10
|
type: PropType<JTWBtnSizeType>;
|
|
11
|
-
default: "
|
|
11
|
+
default: "normal";
|
|
12
12
|
validator: (value: JTWBtnSizeType) => boolean;
|
|
13
13
|
};
|
|
14
14
|
type: {
|
|
15
15
|
type: PropType<JTWBtnTypeType>;
|
|
16
|
-
default: "
|
|
16
|
+
default: "button";
|
|
17
17
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
18
18
|
};
|
|
19
|
+
color: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
outline: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
flat: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
19
31
|
label: {
|
|
20
32
|
type: StringConstructor;
|
|
21
33
|
default: string;
|
|
@@ -25,7 +37,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
25
37
|
default: boolean;
|
|
26
38
|
};
|
|
27
39
|
tips: {
|
|
28
|
-
type: (
|
|
40
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
29
41
|
default: string;
|
|
30
42
|
};
|
|
31
43
|
tooltipConfig: {
|
|
@@ -124,7 +136,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
124
136
|
tag: string | Component;
|
|
125
137
|
}> & Omit<Readonly< ButtonProps> & Readonly<{
|
|
126
138
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
127
|
-
}>, "
|
|
139
|
+
}>, "text" | "size" | "type" | "disabled" | "nativeType" | "loadingIcon" | "plain" | "round" | "dashed" | "autoInsertSpace" | "tag" | "ref" | "shouldAddSpace"> & ShallowUnwrapRef<{
|
|
128
140
|
ref: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
129
141
|
size: ComputedRef<"" | "default" | "large" | "small">;
|
|
130
142
|
type: ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
@@ -229,7 +241,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
229
241
|
tag: string | Component;
|
|
230
242
|
}> & Omit<Readonly< ButtonProps> & Readonly<{
|
|
231
243
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
232
|
-
}>, "
|
|
244
|
+
}>, "text" | "size" | "type" | "disabled" | "nativeType" | "loadingIcon" | "plain" | "round" | "dashed" | "autoInsertSpace" | "tag" | "ref" | "shouldAddSpace"> & ShallowUnwrapRef<{
|
|
233
245
|
ref: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
234
246
|
size: ComputedRef<"" | "default" | "large" | "small">;
|
|
235
247
|
type: ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
@@ -250,10 +262,20 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
250
262
|
'j-tw-btn--large': boolean;
|
|
251
263
|
'j-tw-btn--normal': boolean;
|
|
252
264
|
'j-tw-btn--small': boolean;
|
|
253
|
-
'j-tw-btn--
|
|
254
|
-
'j-tw-btn--
|
|
265
|
+
'j-tw-btn--button': boolean;
|
|
266
|
+
'j-tw-btn--outline': boolean;
|
|
267
|
+
'j-tw-btn--flat': boolean;
|
|
255
268
|
'j-tw-btn--text': boolean;
|
|
256
269
|
}>;
|
|
270
|
+
computedStyle: ComputedRef<{
|
|
271
|
+
'--j-btn-color': string;
|
|
272
|
+
'--j-btn-color-1': string;
|
|
273
|
+
'--j-btn-color-2': string;
|
|
274
|
+
'--j-btn-color-3': string;
|
|
275
|
+
'--j-btn-color-4': string;
|
|
276
|
+
'--j-btn-color-5': string;
|
|
277
|
+
'--j-btn-color-6': string;
|
|
278
|
+
}>;
|
|
257
279
|
mergedTooltipConfig: ComputedRef<{
|
|
258
280
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
259
281
|
effect: "dark" | "light";
|
|
@@ -269,14 +291,26 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
269
291
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
270
292
|
size: {
|
|
271
293
|
type: PropType<JTWBtnSizeType>;
|
|
272
|
-
default: "
|
|
294
|
+
default: "normal";
|
|
273
295
|
validator: (value: JTWBtnSizeType) => boolean;
|
|
274
296
|
};
|
|
275
297
|
type: {
|
|
276
298
|
type: PropType<JTWBtnTypeType>;
|
|
277
|
-
default: "
|
|
299
|
+
default: "button";
|
|
278
300
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
279
301
|
};
|
|
302
|
+
color: {
|
|
303
|
+
type: StringConstructor;
|
|
304
|
+
default: string;
|
|
305
|
+
};
|
|
306
|
+
outline: {
|
|
307
|
+
type: BooleanConstructor;
|
|
308
|
+
default: boolean;
|
|
309
|
+
};
|
|
310
|
+
flat: {
|
|
311
|
+
type: BooleanConstructor;
|
|
312
|
+
default: boolean;
|
|
313
|
+
};
|
|
280
314
|
label: {
|
|
281
315
|
type: StringConstructor;
|
|
282
316
|
default: string;
|
|
@@ -286,7 +320,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
286
320
|
default: boolean;
|
|
287
321
|
};
|
|
288
322
|
tips: {
|
|
289
|
-
type: (
|
|
323
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
290
324
|
default: string;
|
|
291
325
|
};
|
|
292
326
|
tooltipConfig: {
|
|
@@ -296,9 +330,12 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
296
330
|
}>> & Readonly<{
|
|
297
331
|
onClick?: ((_e: MouseEvent) => any) | undefined;
|
|
298
332
|
}>, {
|
|
333
|
+
size: JTWBtnSizeType;
|
|
299
334
|
type: JTWBtnTypeType;
|
|
335
|
+
color: string;
|
|
336
|
+
outline: boolean;
|
|
337
|
+
flat: boolean;
|
|
300
338
|
label: string;
|
|
301
|
-
size: JTWBtnSizeType;
|
|
302
339
|
loading: boolean;
|
|
303
340
|
tips: string | number;
|
|
304
341
|
tooltipConfig: JTWBtnTooltipConfig;
|
|
@@ -481,7 +518,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
481
518
|
strategy: "absolute" | "fixed";
|
|
482
519
|
arrowOffset: number;
|
|
483
520
|
showArrow: boolean;
|
|
484
|
-
role: "dialog" | "
|
|
521
|
+
role: "dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree";
|
|
485
522
|
content: string;
|
|
486
523
|
showAfter: number;
|
|
487
524
|
hideAfter: number;
|
|
@@ -532,7 +569,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
532
569
|
strategy: "absolute" | "fixed";
|
|
533
570
|
arrowOffset: number;
|
|
534
571
|
showArrow: boolean;
|
|
535
|
-
role: "dialog" | "
|
|
572
|
+
role: "dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree";
|
|
536
573
|
content: string;
|
|
537
574
|
showAfter: number;
|
|
538
575
|
hideAfter: number;
|
|
@@ -588,7 +625,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
588
625
|
strategy: "absolute" | "fixed";
|
|
589
626
|
arrowOffset: number;
|
|
590
627
|
showArrow: boolean;
|
|
591
|
-
role: "dialog" | "
|
|
628
|
+
role: "dialog" | "grid" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree";
|
|
592
629
|
content: string;
|
|
593
630
|
showAfter: number;
|
|
594
631
|
hideAfter: number;
|
|
@@ -7,8 +7,7 @@ export declare const JTWBtnSize: {
|
|
|
7
7
|
};
|
|
8
8
|
/** 按钮类型常量 */
|
|
9
9
|
export declare const JTWBtnType: {
|
|
10
|
-
readonly
|
|
11
|
-
readonly SECONDARY: "secondary";
|
|
10
|
+
readonly BUTTON: "button";
|
|
12
11
|
readonly TEXT: "text";
|
|
13
12
|
};
|
|
14
13
|
/** 按钮尺寸类型 */
|
|
@@ -44,10 +43,26 @@ export interface JTWBtnProps {
|
|
|
44
43
|
size?: JTWBtnSizeType;
|
|
45
44
|
/**
|
|
46
45
|
* 按钮类型
|
|
47
|
-
* @default '
|
|
48
|
-
* @values '
|
|
46
|
+
* @default 'button'
|
|
47
|
+
* @values 'button' | 'text'
|
|
49
48
|
*/
|
|
50
49
|
type?: JTWBtnTypeType;
|
|
50
|
+
/**
|
|
51
|
+
* 按钮颜色
|
|
52
|
+
* @default 'primary'
|
|
53
|
+
* @values 'primary' | 'green' | 'orange' | 'red' | 'cyan' | 'brown' | 'yellow' | 'blue' | 'purple' | 'lime' | 'magenta' | 'pink'
|
|
54
|
+
*/
|
|
55
|
+
color?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 是否为 outline 样式
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
outline?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 是否为 flat 样式(浅灰色背景,黑色文字)
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
flat?: boolean;
|
|
51
66
|
/**
|
|
52
67
|
* 按钮文本
|
|
53
68
|
* @default ''
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, ObjectPlugin } from 'vue';
|
|
2
|
+
import { CheckboxProps, CheckboxValueType, ComponentSize, CheckboxGroupProps, CheckboxGroupValueType } from 'element-plus';
|
|
3
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
4
|
+
ElCheckbox: {
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxProps> & Readonly<{
|
|
6
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
9
|
+
change: (val: CheckboxValueType) => void;
|
|
10
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
11
|
+
}, PublicProps, {
|
|
12
|
+
value: string | boolean | number | object;
|
|
13
|
+
label: string | boolean | number | object;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
validateEvent: boolean;
|
|
16
|
+
modelValue: number | string | boolean;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
trueValue: string | number;
|
|
20
|
+
falseValue: string | number;
|
|
21
|
+
trueLabel: string | number;
|
|
22
|
+
falseLabel: string | number;
|
|
23
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
24
|
+
P: {};
|
|
25
|
+
B: {};
|
|
26
|
+
D: {};
|
|
27
|
+
C: {};
|
|
28
|
+
M: {};
|
|
29
|
+
Defaults: {};
|
|
30
|
+
}, Readonly< CheckboxProps> & Readonly<{
|
|
31
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
33
|
+
}>, {}, {}, {}, {}, {
|
|
34
|
+
value: string | boolean | number | object;
|
|
35
|
+
label: string | boolean | number | object;
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
validateEvent: boolean;
|
|
38
|
+
modelValue: number | string | boolean;
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
trueValue: string | number;
|
|
42
|
+
falseValue: string | number;
|
|
43
|
+
trueLabel: string | number;
|
|
44
|
+
falseLabel: string | number;
|
|
45
|
+
}>;
|
|
46
|
+
__isFragment?: never;
|
|
47
|
+
__isTeleport?: never;
|
|
48
|
+
__isSuspense?: never;
|
|
49
|
+
} & ComponentOptionsBase<Readonly< CheckboxProps> & Readonly<{
|
|
50
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
51
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
52
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
53
|
+
change: (val: CheckboxValueType) => void;
|
|
54
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
55
|
+
}, string, {
|
|
56
|
+
value: string | boolean | number | object;
|
|
57
|
+
label: string | boolean | number | object;
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
validateEvent: boolean;
|
|
60
|
+
modelValue: number | string | boolean;
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
trueValue: string | number;
|
|
64
|
+
falseValue: string | number;
|
|
65
|
+
trueLabel: string | number;
|
|
66
|
+
falseLabel: string | number;
|
|
67
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
68
|
+
$slots: {
|
|
69
|
+
default?: (props: {}) => any;
|
|
70
|
+
};
|
|
71
|
+
}) & ObjectPlugin & {
|
|
72
|
+
setPropsDefaults: (defaults: Partial<{
|
|
73
|
+
readonly modelValue?: number | string | boolean | undefined;
|
|
74
|
+
readonly label?: string | boolean | number | object | undefined;
|
|
75
|
+
readonly value?: string | boolean | number | object | undefined;
|
|
76
|
+
readonly indeterminate?: boolean | undefined;
|
|
77
|
+
readonly disabled?: boolean | undefined;
|
|
78
|
+
readonly checked?: boolean | undefined;
|
|
79
|
+
readonly name?: string | undefined;
|
|
80
|
+
readonly trueValue?: string | number | undefined;
|
|
81
|
+
readonly falseValue?: string | number | undefined;
|
|
82
|
+
readonly trueLabel?: string | number | undefined;
|
|
83
|
+
readonly falseLabel?: string | number | undefined;
|
|
84
|
+
readonly id?: string | undefined;
|
|
85
|
+
readonly border?: boolean | undefined;
|
|
86
|
+
readonly size?: ComponentSize | undefined;
|
|
87
|
+
readonly tabindex?: string | number | undefined;
|
|
88
|
+
readonly validateEvent?: boolean | undefined;
|
|
89
|
+
readonly ariaLabel?: string | undefined;
|
|
90
|
+
readonly ariaControls?: string | undefined;
|
|
91
|
+
readonly onChange?: ((val: CheckboxValueType) => any) | undefined | undefined;
|
|
92
|
+
readonly "onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined | undefined;
|
|
93
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps>) => void;
|
|
94
|
+
} & {
|
|
95
|
+
CheckboxButton: {
|
|
96
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxProps> & Readonly<{
|
|
97
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
98
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
99
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
100
|
+
change: (val: CheckboxValueType) => void;
|
|
101
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
102
|
+
}, PublicProps, {
|
|
103
|
+
value: string | boolean | number | object;
|
|
104
|
+
label: string | boolean | number | object;
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
validateEvent: boolean;
|
|
107
|
+
modelValue: number | string | boolean;
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
trueValue: string | number;
|
|
111
|
+
falseValue: string | number;
|
|
112
|
+
trueLabel: string | number;
|
|
113
|
+
falseLabel: string | number;
|
|
114
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
115
|
+
P: {};
|
|
116
|
+
B: {};
|
|
117
|
+
D: {};
|
|
118
|
+
C: {};
|
|
119
|
+
M: {};
|
|
120
|
+
Defaults: {};
|
|
121
|
+
}, Readonly< CheckboxProps> & Readonly<{
|
|
122
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
123
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
124
|
+
}>, {}, {}, {}, {}, {
|
|
125
|
+
value: string | boolean | number | object;
|
|
126
|
+
label: string | boolean | number | object;
|
|
127
|
+
disabled: boolean;
|
|
128
|
+
validateEvent: boolean;
|
|
129
|
+
modelValue: number | string | boolean;
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
trueValue: string | number;
|
|
133
|
+
falseValue: string | number;
|
|
134
|
+
trueLabel: string | number;
|
|
135
|
+
falseLabel: string | number;
|
|
136
|
+
}>;
|
|
137
|
+
__isFragment?: never;
|
|
138
|
+
__isTeleport?: never;
|
|
139
|
+
__isSuspense?: never;
|
|
140
|
+
} & ComponentOptionsBase<Readonly< CheckboxProps> & Readonly<{
|
|
141
|
+
onChange?: ((val: CheckboxValueType) => any) | undefined;
|
|
142
|
+
"onUpdate:modelValue"?: ((val: CheckboxValueType) => any) | undefined;
|
|
143
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
144
|
+
change: (val: CheckboxValueType) => void;
|
|
145
|
+
"update:modelValue": (val: CheckboxValueType) => void;
|
|
146
|
+
}, string, {
|
|
147
|
+
value: string | boolean | number | object;
|
|
148
|
+
label: string | boolean | number | object;
|
|
149
|
+
disabled: boolean;
|
|
150
|
+
validateEvent: boolean;
|
|
151
|
+
modelValue: number | string | boolean;
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
trueValue: string | number;
|
|
155
|
+
falseValue: string | number;
|
|
156
|
+
trueLabel: string | number;
|
|
157
|
+
falseLabel: string | number;
|
|
158
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
159
|
+
$slots: {
|
|
160
|
+
default?: (props: {}) => any;
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
CheckboxGroup: {
|
|
164
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< CheckboxGroupProps> & Readonly<{
|
|
165
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
166
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
167
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
168
|
+
change: (val: CheckboxValueType[]) => void;
|
|
169
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
170
|
+
}, PublicProps, {
|
|
171
|
+
type: "checkbox" | "button";
|
|
172
|
+
props: {
|
|
173
|
+
value?: string;
|
|
174
|
+
label?: string;
|
|
175
|
+
disabled?: string;
|
|
176
|
+
};
|
|
177
|
+
disabled: boolean;
|
|
178
|
+
validateEvent: boolean;
|
|
179
|
+
modelValue: CheckboxGroupValueType;
|
|
180
|
+
tag: string;
|
|
181
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
182
|
+
P: {};
|
|
183
|
+
B: {};
|
|
184
|
+
D: {};
|
|
185
|
+
C: {};
|
|
186
|
+
M: {};
|
|
187
|
+
Defaults: {};
|
|
188
|
+
}, Readonly< CheckboxGroupProps> & Readonly<{
|
|
189
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
190
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
191
|
+
}>, {}, {}, {}, {}, {
|
|
192
|
+
type: "checkbox" | "button";
|
|
193
|
+
props: {
|
|
194
|
+
value?: string;
|
|
195
|
+
label?: string;
|
|
196
|
+
disabled?: string;
|
|
197
|
+
};
|
|
198
|
+
disabled: boolean;
|
|
199
|
+
validateEvent: boolean;
|
|
200
|
+
modelValue: CheckboxGroupValueType;
|
|
201
|
+
tag: string;
|
|
202
|
+
}>;
|
|
203
|
+
__isFragment?: never;
|
|
204
|
+
__isTeleport?: never;
|
|
205
|
+
__isSuspense?: never;
|
|
206
|
+
} & ComponentOptionsBase<Readonly< CheckboxGroupProps> & Readonly<{
|
|
207
|
+
onChange?: ((val: CheckboxValueType[]) => any) | undefined;
|
|
208
|
+
"onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
|
|
209
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
210
|
+
change: (val: CheckboxValueType[]) => void;
|
|
211
|
+
"update:modelValue": (val: CheckboxGroupValueType) => void;
|
|
212
|
+
}, string, {
|
|
213
|
+
type: "checkbox" | "button";
|
|
214
|
+
props: {
|
|
215
|
+
value?: string;
|
|
216
|
+
label?: string;
|
|
217
|
+
disabled?: string;
|
|
218
|
+
};
|
|
219
|
+
disabled: boolean;
|
|
220
|
+
validateEvent: boolean;
|
|
221
|
+
modelValue: CheckboxGroupValueType;
|
|
222
|
+
tag: string;
|
|
223
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
224
|
+
$slots: {
|
|
225
|
+
default?: (props: {}) => any;
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
230
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
export interface JTWCheckboxProps {
|
|
3
|
+
modelValue?: boolean | string | number;
|
|
4
|
+
label?: string | number | boolean;
|
|
5
|
+
trueLabel?: string | number;
|
|
6
|
+
falseLabel?: string | number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
border?: boolean;
|
|
9
|
+
size?: 'large' | 'default' | 'small';
|
|
10
|
+
name?: string;
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
indeterminate?: boolean;
|
|
13
|
+
validateEvent?: boolean;
|
|
14
|
+
tabindex?: string | number;
|
|
15
|
+
id?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface JTWCheckboxEmits {
|
|
18
|
+
(e: 'update:modelValue', value: boolean | string | number): void;
|
|
19
|
+
(e: 'change', value: boolean | string | number): void;
|
|
20
|
+
}
|
|
21
|
+
export interface JTWCheckboxSlots {
|
|
22
|
+
default?: () => any;
|
|
23
|
+
}
|
|
24
|
+
export type JTWCheckboxEmitsOptions = {
|
|
25
|
+
'update:modelValue': (value: boolean | string | number) => true;
|
|
26
|
+
change: (value: boolean | string | number) => true;
|
|
27
|
+
};
|
|
28
|
+
export type JTWCheckboxComponent = DefineComponent<JTWCheckboxProps, {}, {}, {}, {}, {}, {}, JTWCheckboxEmitsOptions>;
|
|
29
|
+
export type JTWCheckboxInstance = InstanceType<JTWCheckboxComponent>;
|
|
30
|
+
export interface JTWCheckboxTemplateProps extends JTWCheckboxProps {
|
|
31
|
+
'onUpdate:modelValue'?: (value: boolean | string | number) => void;
|
|
32
|
+
onChange?: (value: boolean | string | number) => void;
|
|
33
|
+
class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
|
|
34
|
+
style?: string | Record<string, string>;
|
|
35
|
+
}
|