twcpt 0.0.10 → 0.0.12
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/dist/components/j-tw-btn/index.d.ts +18 -13
- package/dist/components/j-tw-btn/types.d.ts +23 -1
- package/dist/components/j-tw-confirm-dialog/index.d.ts +18 -12
- package/dist/components/j-tw-confirm-dialog/{jwConfirmDialog.d.ts → twConfirmDialog.d.ts} +1 -1
- package/dist/components/j-tw-confirm-dialog/types.d.ts +1 -1
- package/dist/components/j-tw-dialog/index.d.ts +31 -13
- package/dist/components/j-tw-dialog/types.d.ts +19 -0
- package/dist/components/j-tw-messages/MessageItem.d.ts +3 -3
- package/dist/components/j-tw-messages/index.d.ts +6 -17
- package/dist/components/j-tw-messages/state.d.ts +2 -2
- package/dist/components/j-tw-messages/twMessages.d.ts +2 -0
- package/dist/components/j-tw-messages/types.d.ts +2 -6
- package/dist/components/j-tw-tree-select-btn/index.d.ts +19 -13
- package/dist/components/j-tw-tree-select-input/index.d.ts +18 -12
- package/dist/global.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/twcpt.cjs.js +2 -2
- package/dist/twcpt.es.js +2083 -1948
- package/dist/utils/useBizRequest.d.ts +7 -2
- package/package.json +1 -1
- package/dist/components/j-tw-messages/jwMessages.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType, DefineComponent, ExtractPropTypes, Ref, ComponentInternalInstance, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PublicProps, CreateComponentPublicInstanceWithMixins, ObjectPlugin, CSSProperties, StyleValue } from 'vue';
|
|
2
|
-
import { JTWBtnSizeType, JTWBtnTooltipConfig, JTWBtnTypeType } from './types';
|
|
2
|
+
import { JTWBtnSizeType, JTWBtnTooltipConfig, JTWBtnTypeType, JTWBtnColorType } from './types';
|
|
3
3
|
import { ComponentSize, ButtonType, ButtonNativeType, ButtonProps, UseTooltipProps, PopperInstance, TooltipContentInstance, PopperEffect, Placement, Options, TooltipTriggerType } from 'element-plus';
|
|
4
4
|
import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
|
|
5
5
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -17,8 +17,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
17
17
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
18
18
|
};
|
|
19
19
|
color: {
|
|
20
|
-
type:
|
|
20
|
+
type: PropType<JTWBtnColorType>;
|
|
21
21
|
default: string;
|
|
22
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
23
|
+
};
|
|
24
|
+
textColor: {
|
|
25
|
+
type: PropType<JTWBtnColorType>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
22
28
|
};
|
|
23
29
|
outline: {
|
|
24
30
|
type: BooleanConstructor;
|
|
@@ -267,15 +273,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
267
273
|
'j-tw-btn--flat': boolean;
|
|
268
274
|
'j-tw-btn--text': boolean;
|
|
269
275
|
}>;
|
|
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
|
-
}>;
|
|
276
|
+
computedStyle: ComputedRef<Record<string, string>>;
|
|
279
277
|
mergedTooltipConfig: ComputedRef<{
|
|
280
278
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
281
279
|
effect: "dark" | "light";
|
|
@@ -300,8 +298,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
300
298
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
301
299
|
};
|
|
302
300
|
color: {
|
|
303
|
-
type:
|
|
301
|
+
type: PropType<JTWBtnColorType>;
|
|
304
302
|
default: string;
|
|
303
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
304
|
+
};
|
|
305
|
+
textColor: {
|
|
306
|
+
type: PropType<JTWBtnColorType>;
|
|
307
|
+
default: undefined;
|
|
308
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
305
309
|
};
|
|
306
310
|
outline: {
|
|
307
311
|
type: BooleanConstructor;
|
|
@@ -332,7 +336,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
332
336
|
}>, {
|
|
333
337
|
size: JTWBtnSizeType;
|
|
334
338
|
type: JTWBtnTypeType;
|
|
335
|
-
color:
|
|
339
|
+
color: JTWBtnColorType;
|
|
340
|
+
textColor: JTWBtnColorType;
|
|
336
341
|
outline: boolean;
|
|
337
342
|
flat: boolean;
|
|
338
343
|
label: string;
|
|
@@ -10,10 +10,27 @@ export declare const JTWBtnType: {
|
|
|
10
10
|
readonly BUTTON: "button";
|
|
11
11
|
readonly TEXT: "text";
|
|
12
12
|
};
|
|
13
|
+
/** 按钮颜色常量 */
|
|
14
|
+
export declare const JTWBtnColor: {
|
|
15
|
+
readonly PRIMARY: "primary";
|
|
16
|
+
readonly GREEN: "green";
|
|
17
|
+
readonly ORANGE: "orange";
|
|
18
|
+
readonly RED: "red";
|
|
19
|
+
readonly CYAN: "cyan";
|
|
20
|
+
readonly BROWN: "brown";
|
|
21
|
+
readonly YELLOW: "yellow";
|
|
22
|
+
readonly BLUE: "blue";
|
|
23
|
+
readonly PURPLE: "purple";
|
|
24
|
+
readonly LIME: "lime";
|
|
25
|
+
readonly MAGENTA: "magenta";
|
|
26
|
+
readonly PINK: "pink";
|
|
27
|
+
};
|
|
13
28
|
/** 按钮尺寸类型 */
|
|
14
29
|
export type JTWBtnSizeType = (typeof JTWBtnSize)[keyof typeof JTWBtnSize];
|
|
15
30
|
/** 按钮类型类型 */
|
|
16
31
|
export type JTWBtnTypeType = (typeof JTWBtnType)[keyof typeof JTWBtnType];
|
|
32
|
+
/** 按钮颜色类型 */
|
|
33
|
+
export type JTWBtnColorType = (typeof JTWBtnColor)[keyof typeof JTWBtnColor];
|
|
17
34
|
/** Tooltip 配置 */
|
|
18
35
|
export interface JTWBtnTooltipConfig {
|
|
19
36
|
/** 弹出位置,默认 'top' */
|
|
@@ -52,7 +69,12 @@ export interface JTWBtnProps {
|
|
|
52
69
|
* @default 'primary'
|
|
53
70
|
* @values 'primary' | 'green' | 'orange' | 'red' | 'cyan' | 'brown' | 'yellow' | 'blue' | 'purple' | 'lime' | 'magenta' | 'pink'
|
|
54
71
|
*/
|
|
55
|
-
color?:
|
|
72
|
+
color?: JTWBtnColorType;
|
|
73
|
+
/**
|
|
74
|
+
* 文字颜色
|
|
75
|
+
* @values 'primary' | 'green' | 'orange' | 'red' | 'cyan' | 'brown' | 'yellow' | 'blue' | 'purple' | 'lime' | 'magenta' | 'pink'
|
|
76
|
+
*/
|
|
77
|
+
textColor?: JTWBtnColorType;
|
|
56
78
|
/**
|
|
57
79
|
* 是否为 outline 样式
|
|
58
80
|
* @default false
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType, DefineComponent, ExtractPropTypes, ComputedRef, ComponentOptionsMixin, PublicProps, Ref, ComponentInternalInstance, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, CreateComponentPublicInstanceWithMixins, ObjectPlugin, CSSProperties, StyleValue } from 'vue';
|
|
2
2
|
import { JTWConfirmDialogIconType } from './types';
|
|
3
3
|
import { JTWBtnSizeType, JTWBtnTypeType, JTWBtnTooltipConfig } from '../..';
|
|
4
|
+
import { JTWBtnColorType } from '../j-tw-btn/types';
|
|
4
5
|
import { ComponentSize, ButtonType, ButtonNativeType, ButtonProps, UseTooltipProps, PopperInstance, TooltipContentInstance, PopperEffect, Placement, Options, TooltipTriggerType } from 'element-plus';
|
|
5
6
|
import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
|
|
6
7
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -77,8 +78,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
77
78
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
78
79
|
};
|
|
79
80
|
color: {
|
|
80
|
-
type:
|
|
81
|
+
type: PropType< JTWBtnColorType>;
|
|
81
82
|
default: string;
|
|
83
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
84
|
+
};
|
|
85
|
+
textColor: {
|
|
86
|
+
type: PropType< JTWBtnColorType>;
|
|
87
|
+
default: undefined;
|
|
88
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
82
89
|
};
|
|
83
90
|
outline: {
|
|
84
91
|
type: BooleanConstructor;
|
|
@@ -327,15 +334,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
327
334
|
'j-tw-btn--flat': boolean;
|
|
328
335
|
'j-tw-btn--text': boolean;
|
|
329
336
|
}>;
|
|
330
|
-
computedStyle: ComputedRef<
|
|
331
|
-
'--j-btn-color': string;
|
|
332
|
-
'--j-btn-color-1': string;
|
|
333
|
-
'--j-btn-color-2': string;
|
|
334
|
-
'--j-btn-color-3': string;
|
|
335
|
-
'--j-btn-color-4': string;
|
|
336
|
-
'--j-btn-color-5': string;
|
|
337
|
-
'--j-btn-color-6': string;
|
|
338
|
-
}>;
|
|
337
|
+
computedStyle: ComputedRef<Record<string, string>>;
|
|
339
338
|
mergedTooltipConfig: ComputedRef<{
|
|
340
339
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
341
340
|
effect: "dark" | "light";
|
|
@@ -360,8 +359,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
360
359
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
361
360
|
};
|
|
362
361
|
color: {
|
|
363
|
-
type:
|
|
362
|
+
type: PropType< JTWBtnColorType>;
|
|
364
363
|
default: string;
|
|
364
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
365
|
+
};
|
|
366
|
+
textColor: {
|
|
367
|
+
type: PropType< JTWBtnColorType>;
|
|
368
|
+
default: undefined;
|
|
369
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
365
370
|
};
|
|
366
371
|
outline: {
|
|
367
372
|
type: BooleanConstructor;
|
|
@@ -392,7 +397,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
392
397
|
}>, {
|
|
393
398
|
size: JTWBtnSizeType;
|
|
394
399
|
type: JTWBtnTypeType;
|
|
395
|
-
color:
|
|
400
|
+
color: JTWBtnColorType;
|
|
401
|
+
textColor: JTWBtnColorType;
|
|
396
402
|
outline: boolean;
|
|
397
403
|
flat: boolean;
|
|
398
404
|
label: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JTWConfirmDialogOptions } from './types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function twConfirmDialog(options: JTWConfirmDialogOptions): Promise<boolean>;
|
|
@@ -9,7 +9,7 @@ export declare const JTWConfirmDialogIcon: {
|
|
|
9
9
|
/** 确认对话框图标类型 */
|
|
10
10
|
export type JTWConfirmDialogIconType = (typeof JTWConfirmDialogIcon)[keyof typeof JTWConfirmDialogIcon];
|
|
11
11
|
/**
|
|
12
|
-
* @description
|
|
12
|
+
* @description twConfirmDialog 调用选项
|
|
13
13
|
*/
|
|
14
14
|
export interface JTWConfirmDialogOptions {
|
|
15
15
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { nextTick, PropType, DefineComponent, ExtractPropTypes, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentInternalInstance, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, CreateComponentPublicInstanceWithMixins, ObjectPlugin, CSSProperties, StyleValue } from 'vue';
|
|
2
|
-
import { JTWDialogPositionType, JTWDialogSizeType, JTWDialogFooterModeType } from './types';
|
|
2
|
+
import { JTWDialogPositionType, JTWDialogSizeType, JTWDialogFooterModeType, JTWDialogFooterExtra } from './types';
|
|
3
3
|
import { JTWBtnSizeType, JTWBtnTypeType, JTWBtnTooltipConfig } from '../..';
|
|
4
|
+
import { JTWBtnColorType } from '../j-tw-btn/types';
|
|
4
5
|
import { ComponentSize, ButtonType, ButtonNativeType, ButtonProps, UseTooltipProps, PopperInstance, TooltipContentInstance, PopperEffect, Placement, Options, TooltipTriggerType } from 'element-plus';
|
|
5
6
|
import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
|
|
6
7
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -61,6 +62,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
61
62
|
type: BooleanConstructor;
|
|
62
63
|
default: boolean;
|
|
63
64
|
};
|
|
65
|
+
footerExtra: {
|
|
66
|
+
type: PropType<JTWDialogFooterExtra>;
|
|
67
|
+
default: null;
|
|
68
|
+
};
|
|
64
69
|
}>, {
|
|
65
70
|
visible: Ref<boolean, boolean>;
|
|
66
71
|
maskRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -73,6 +78,9 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
73
78
|
computedComponentBind: ComputedRef<{
|
|
74
79
|
dialogInstance: any;
|
|
75
80
|
}>;
|
|
81
|
+
computedFooterExtraBind: ComputedRef<{
|
|
82
|
+
[x: string]: any;
|
|
83
|
+
}>;
|
|
76
84
|
open: () => void;
|
|
77
85
|
close: () => void;
|
|
78
86
|
setLoading: (_loading: boolean) => void;
|
|
@@ -138,6 +146,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
138
146
|
type: BooleanConstructor;
|
|
139
147
|
default: boolean;
|
|
140
148
|
};
|
|
149
|
+
footerExtra: {
|
|
150
|
+
type: PropType<JTWDialogFooterExtra>;
|
|
151
|
+
default: null;
|
|
152
|
+
};
|
|
141
153
|
}>> & Readonly<{}>, {
|
|
142
154
|
size: JTWDialogSizeType;
|
|
143
155
|
component: null;
|
|
@@ -152,6 +164,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
152
164
|
componentOn: Record<string, any>;
|
|
153
165
|
closeOnMask: boolean;
|
|
154
166
|
closeOnEsc: boolean;
|
|
167
|
+
footerExtra: JTWDialogFooterExtra;
|
|
155
168
|
}, {}, {
|
|
156
169
|
JTWBtn: DefineComponent<ExtractPropTypes<{
|
|
157
170
|
size: {
|
|
@@ -165,8 +178,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
165
178
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
166
179
|
};
|
|
167
180
|
color: {
|
|
168
|
-
type:
|
|
181
|
+
type: PropType< JTWBtnColorType>;
|
|
169
182
|
default: string;
|
|
183
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
184
|
+
};
|
|
185
|
+
textColor: {
|
|
186
|
+
type: PropType< JTWBtnColorType>;
|
|
187
|
+
default: undefined;
|
|
188
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
170
189
|
};
|
|
171
190
|
outline: {
|
|
172
191
|
type: BooleanConstructor;
|
|
@@ -415,15 +434,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
415
434
|
'j-tw-btn--flat': boolean;
|
|
416
435
|
'j-tw-btn--text': boolean;
|
|
417
436
|
}>;
|
|
418
|
-
computedStyle: ComputedRef<
|
|
419
|
-
'--j-btn-color': string;
|
|
420
|
-
'--j-btn-color-1': string;
|
|
421
|
-
'--j-btn-color-2': string;
|
|
422
|
-
'--j-btn-color-3': string;
|
|
423
|
-
'--j-btn-color-4': string;
|
|
424
|
-
'--j-btn-color-5': string;
|
|
425
|
-
'--j-btn-color-6': string;
|
|
426
|
-
}>;
|
|
437
|
+
computedStyle: ComputedRef<Record<string, string>>;
|
|
427
438
|
mergedTooltipConfig: ComputedRef<{
|
|
428
439
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
429
440
|
effect: "dark" | "light";
|
|
@@ -448,8 +459,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
448
459
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
449
460
|
};
|
|
450
461
|
color: {
|
|
451
|
-
type:
|
|
462
|
+
type: PropType< JTWBtnColorType>;
|
|
452
463
|
default: string;
|
|
464
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
465
|
+
};
|
|
466
|
+
textColor: {
|
|
467
|
+
type: PropType< JTWBtnColorType>;
|
|
468
|
+
default: undefined;
|
|
469
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
453
470
|
};
|
|
454
471
|
outline: {
|
|
455
472
|
type: BooleanConstructor;
|
|
@@ -480,7 +497,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
480
497
|
}>, {
|
|
481
498
|
size: JTWBtnSizeType;
|
|
482
499
|
type: JTWBtnTypeType;
|
|
483
|
-
color:
|
|
500
|
+
color: JTWBtnColorType;
|
|
501
|
+
textColor: JTWBtnColorType;
|
|
484
502
|
outline: boolean;
|
|
485
503
|
flat: boolean;
|
|
486
504
|
label: string;
|
|
@@ -19,6 +19,19 @@ export declare const JTWDialogFooterMode: {
|
|
|
19
19
|
export type JTWDialogPositionType = (typeof JTWDialogPosition)[keyof typeof JTWDialogPosition];
|
|
20
20
|
export type JTWDialogSizeType = (typeof JTWDialogSize)[keyof typeof JTWDialogSize];
|
|
21
21
|
export type JTWDialogFooterModeType = (typeof JTWDialogFooterMode)[keyof typeof JTWDialogFooterMode];
|
|
22
|
+
/**
|
|
23
|
+
* @description Footer Extra 配置
|
|
24
|
+
*/
|
|
25
|
+
export interface JTWDialogFooterExtra {
|
|
26
|
+
/**
|
|
27
|
+
* 自定义组件
|
|
28
|
+
*/
|
|
29
|
+
component: any;
|
|
30
|
+
/**
|
|
31
|
+
* 组件 Props
|
|
32
|
+
*/
|
|
33
|
+
bind?: Record<string, any>;
|
|
34
|
+
}
|
|
22
35
|
/**
|
|
23
36
|
* @description jwDialog 调用选项
|
|
24
37
|
*/
|
|
@@ -84,6 +97,10 @@ export interface JTWDialogOptions {
|
|
|
84
97
|
* @default true
|
|
85
98
|
*/
|
|
86
99
|
closeOnEsc?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Footer 上方的额外组件配置
|
|
102
|
+
*/
|
|
103
|
+
footerExtra?: JTWDialogFooterExtra;
|
|
87
104
|
}
|
|
88
105
|
/**
|
|
89
106
|
* @description JTWDialog 组件 Props
|
|
@@ -103,6 +120,7 @@ export interface JTWDialogProps {
|
|
|
103
120
|
componentOn?: Record<string, any>;
|
|
104
121
|
closeOnMask?: boolean;
|
|
105
122
|
closeOnEsc?: boolean;
|
|
123
|
+
footerExtra?: JTWDialogFooterExtra;
|
|
106
124
|
}
|
|
107
125
|
/** JTWDialog Expose 接口 */
|
|
108
126
|
export interface JTWDialogExpose {
|
|
@@ -111,6 +129,7 @@ export interface JTWDialogExpose {
|
|
|
111
129
|
setLoading: (loading: boolean) => void;
|
|
112
130
|
changeCancelText: (text: string) => void;
|
|
113
131
|
changeConfirmText: (text: string) => void;
|
|
132
|
+
setFooterExtraBind: (bind: Record<string, any>) => void;
|
|
114
133
|
}
|
|
115
134
|
/** JTWDialog 组件类型定义 */
|
|
116
135
|
export type JTWDialogComponent = DefineComponent<JTWDialogProps>;
|
|
@@ -5,7 +5,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
5
5
|
required: true;
|
|
6
6
|
};
|
|
7
7
|
type: {
|
|
8
|
-
type: PropType<"success" | "warning" | "info" | "error">;
|
|
8
|
+
type: PropType<"success" | "warning" | "info" | "error" | "normal">;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
11
|
content: {
|
|
@@ -49,7 +49,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
49
49
|
required: true;
|
|
50
50
|
};
|
|
51
51
|
type: {
|
|
52
|
-
type: PropType<"success" | "warning" | "info" | "error">;
|
|
52
|
+
type: PropType<"success" | "warning" | "info" | "error" | "normal">;
|
|
53
53
|
default: string;
|
|
54
54
|
};
|
|
55
55
|
content: {
|
|
@@ -75,7 +75,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
75
75
|
}>> & Readonly<{
|
|
76
76
|
onDestroy?: ((_id: string) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
-
type: "success" | "warning" | "info" | "error";
|
|
78
|
+
type: "normal" | "success" | "warning" | "info" | "error";
|
|
79
79
|
offset: number;
|
|
80
80
|
onClose: () => void;
|
|
81
81
|
duration: number;
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import { DefineComponent,
|
|
2
|
-
import { MessageItemData } from './types';
|
|
1
|
+
import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, Ref, ComponentProvideOptions } from 'vue';
|
|
3
2
|
declare const _default: DefineComponent<{}, {
|
|
4
|
-
messages:
|
|
5
|
-
id: string;
|
|
6
|
-
type: "success" | "warning" | "info" | "error";
|
|
7
|
-
content: string;
|
|
8
|
-
duration: number;
|
|
9
|
-
showClose: boolean;
|
|
3
|
+
messages: ComputedRef<{
|
|
10
4
|
offset: number;
|
|
11
|
-
onClose?: (() => void) | undefined;
|
|
12
|
-
visible: boolean;
|
|
13
|
-
timer?: number | undefined;
|
|
14
|
-
}[], MessageItemData[] | {
|
|
15
5
|
id: string;
|
|
16
|
-
type: "success" | "warning" | "info" | "error";
|
|
6
|
+
type: "success" | "warning" | "info" | "error" | "normal";
|
|
17
7
|
content: string;
|
|
18
8
|
duration: number;
|
|
19
9
|
showClose: boolean;
|
|
20
|
-
offset: number;
|
|
21
10
|
onClose?: (() => void) | undefined;
|
|
22
11
|
visible: boolean;
|
|
23
12
|
timer?: number | undefined;
|
|
@@ -30,7 +19,7 @@ declare const _default: DefineComponent<{}, {
|
|
|
30
19
|
required: true;
|
|
31
20
|
};
|
|
32
21
|
type: {
|
|
33
|
-
type: PropType<"success" | "warning" | "info" | "error">;
|
|
22
|
+
type: PropType<"success" | "warning" | "info" | "error" | "normal">;
|
|
34
23
|
default: string;
|
|
35
24
|
};
|
|
36
25
|
content: {
|
|
@@ -74,7 +63,7 @@ declare const _default: DefineComponent<{}, {
|
|
|
74
63
|
required: true;
|
|
75
64
|
};
|
|
76
65
|
type: {
|
|
77
|
-
type: PropType<"success" | "warning" | "info" | "error">;
|
|
66
|
+
type: PropType<"success" | "warning" | "info" | "error" | "normal">;
|
|
78
67
|
default: string;
|
|
79
68
|
};
|
|
80
69
|
content: {
|
|
@@ -100,7 +89,7 @@ declare const _default: DefineComponent<{}, {
|
|
|
100
89
|
}>> & Readonly<{
|
|
101
90
|
onDestroy?: ((_id: string) => any) | undefined;
|
|
102
91
|
}>, {
|
|
103
|
-
type: "success" | "warning" | "info" | "error";
|
|
92
|
+
type: "normal" | "success" | "warning" | "info" | "error";
|
|
104
93
|
offset: number;
|
|
105
94
|
onClose: () => void;
|
|
106
95
|
duration: number;
|
|
@@ -2,7 +2,7 @@ import { MessageItemData } from './types';
|
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
export declare const messageList: Ref<{
|
|
4
4
|
id: string;
|
|
5
|
-
type: "success" | "warning" | "info" | "error";
|
|
5
|
+
type: "success" | "warning" | "info" | "error" | "normal";
|
|
6
6
|
content: string;
|
|
7
7
|
duration: number;
|
|
8
8
|
showClose: boolean;
|
|
@@ -12,7 +12,7 @@ export declare const messageList: Ref<{
|
|
|
12
12
|
timer?: number | undefined;
|
|
13
13
|
}[], MessageItemData[] | {
|
|
14
14
|
id: string;
|
|
15
|
-
type: "success" | "warning" | "info" | "error";
|
|
15
|
+
type: "success" | "warning" | "info" | "error" | "normal";
|
|
16
16
|
content: string;
|
|
17
17
|
duration: number;
|
|
18
18
|
showClose: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface JTWMessageOptions {
|
|
2
|
-
type?: 'success' | 'warning' | 'info' | 'error';
|
|
2
|
+
type?: 'success' | 'warning' | 'info' | 'error' | 'normal';
|
|
3
3
|
content: string;
|
|
4
4
|
duration?: number;
|
|
5
5
|
showClose?: boolean;
|
|
@@ -12,15 +12,11 @@ export interface JTWMessageInstance {
|
|
|
12
12
|
}
|
|
13
13
|
export interface JTWMessagesAPI {
|
|
14
14
|
show: (options: JTWMessageOptions) => JTWMessageInstance;
|
|
15
|
-
success: (content: string, duration?: number) => JTWMessageInstance;
|
|
16
|
-
warning: (content: string, duration?: number) => JTWMessageInstance;
|
|
17
|
-
info: (content: string, duration?: number) => JTWMessageInstance;
|
|
18
|
-
error: (content: string, duration?: number) => JTWMessageInstance;
|
|
19
15
|
closeAll: () => void;
|
|
20
16
|
}
|
|
21
17
|
export interface MessageItemData {
|
|
22
18
|
id: string;
|
|
23
|
-
type: 'success' | 'warning' | 'info' | 'error';
|
|
19
|
+
type: 'success' | 'warning' | 'info' | 'error' | 'normal';
|
|
24
20
|
content: string;
|
|
25
21
|
duration: number;
|
|
26
22
|
showClose: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nextTick, PropType, DefineComponent, ExtractPropTypes, Ref, ComponentInternalInstance, Component, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PublicProps, CreateComponentPublicInstanceWithMixins, ObjectPlugin, CSSProperties, StyleValue } from 'vue';
|
|
2
|
-
import { JTWBtnSizeType, JTWBtnTooltipConfig, JTWBtnTypeType } from '../j-tw-btn/types';
|
|
2
|
+
import { JTWBtnSizeType, JTWBtnTooltipConfig, JTWBtnTypeType, JTWBtnColorType } from '../j-tw-btn/types';
|
|
3
3
|
import { JTWTreeNode } from './types';
|
|
4
4
|
import { ComponentSize, ButtonType, ButtonNativeType, ButtonProps, UseTooltipProps, PopperInstance, TooltipContentInstance, PopperEffect, Placement, Options, TooltipTriggerType } from 'element-plus';
|
|
5
5
|
import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
|
|
@@ -318,6 +318,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
318
318
|
'--j-btn-color-5': string;
|
|
319
319
|
'--j-btn-color-6': string;
|
|
320
320
|
'--j-tree-select-btn-color': string;
|
|
321
|
+
'--j-btn-text-color': string;
|
|
321
322
|
}>;
|
|
322
323
|
mergedTooltipConfig: ComputedRef<{
|
|
323
324
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
@@ -743,8 +744,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
743
744
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
744
745
|
};
|
|
745
746
|
color: {
|
|
746
|
-
type:
|
|
747
|
+
type: PropType< JTWBtnColorType>;
|
|
747
748
|
default: string;
|
|
749
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
750
|
+
};
|
|
751
|
+
textColor: {
|
|
752
|
+
type: PropType< JTWBtnColorType>;
|
|
753
|
+
default: undefined;
|
|
754
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
748
755
|
};
|
|
749
756
|
outline: {
|
|
750
757
|
type: BooleanConstructor;
|
|
@@ -993,15 +1000,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
993
1000
|
'j-tw-btn--flat': boolean;
|
|
994
1001
|
'j-tw-btn--text': boolean;
|
|
995
1002
|
}>;
|
|
996
|
-
computedStyle: ComputedRef<
|
|
997
|
-
'--j-btn-color': string;
|
|
998
|
-
'--j-btn-color-1': string;
|
|
999
|
-
'--j-btn-color-2': string;
|
|
1000
|
-
'--j-btn-color-3': string;
|
|
1001
|
-
'--j-btn-color-4': string;
|
|
1002
|
-
'--j-btn-color-5': string;
|
|
1003
|
-
'--j-btn-color-6': string;
|
|
1004
|
-
}>;
|
|
1003
|
+
computedStyle: ComputedRef<Record<string, string>>;
|
|
1005
1004
|
mergedTooltipConfig: ComputedRef<{
|
|
1006
1005
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
1007
1006
|
effect: "dark" | "light";
|
|
@@ -1026,8 +1025,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
1026
1025
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
1027
1026
|
};
|
|
1028
1027
|
color: {
|
|
1029
|
-
type:
|
|
1028
|
+
type: PropType< JTWBtnColorType>;
|
|
1030
1029
|
default: string;
|
|
1030
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
1031
|
+
};
|
|
1032
|
+
textColor: {
|
|
1033
|
+
type: PropType< JTWBtnColorType>;
|
|
1034
|
+
default: undefined;
|
|
1035
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
1031
1036
|
};
|
|
1032
1037
|
outline: {
|
|
1033
1038
|
type: BooleanConstructor;
|
|
@@ -1058,7 +1063,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
1058
1063
|
}>, {
|
|
1059
1064
|
size: JTWBtnSizeType;
|
|
1060
1065
|
type: JTWBtnTypeType;
|
|
1061
|
-
color:
|
|
1066
|
+
color: JTWBtnColorType;
|
|
1067
|
+
textColor: JTWBtnColorType;
|
|
1062
1068
|
outline: boolean;
|
|
1063
1069
|
flat: boolean;
|
|
1064
1070
|
label: string;
|
|
@@ -8,6 +8,7 @@ import { OptionValue, SelectStates } from 'element-plus/es/components/select/src
|
|
|
8
8
|
import { PromisifyFn } from '@vueuse/shared';
|
|
9
9
|
import { Arrayable } from 'element-plus/es/utils/typescript.mjs';
|
|
10
10
|
import { JTWBtnSizeType, JTWBtnTypeType, JTWBtnTooltipConfig, JTWTreeNode } from '../..';
|
|
11
|
+
import { JTWBtnColorType } from '../j-tw-btn/types';
|
|
11
12
|
import { OnCleanup } from '@vue/reactivity';
|
|
12
13
|
import { ButtonGroupProps } from 'element-plus/es/components/button/src/button-group.mjs';
|
|
13
14
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
@@ -4619,8 +4620,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
4619
4620
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
4620
4621
|
};
|
|
4621
4622
|
color: {
|
|
4622
|
-
type:
|
|
4623
|
+
type: PropType< JTWBtnColorType>;
|
|
4623
4624
|
default: string;
|
|
4625
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
4626
|
+
};
|
|
4627
|
+
textColor: {
|
|
4628
|
+
type: PropType< JTWBtnColorType>;
|
|
4629
|
+
default: undefined;
|
|
4630
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
4624
4631
|
};
|
|
4625
4632
|
outline: {
|
|
4626
4633
|
type: BooleanConstructor;
|
|
@@ -4869,15 +4876,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
4869
4876
|
'j-tw-btn--flat': boolean;
|
|
4870
4877
|
'j-tw-btn--text': boolean;
|
|
4871
4878
|
}>;
|
|
4872
|
-
computedStyle: ComputedRef<
|
|
4873
|
-
'--j-btn-color': string;
|
|
4874
|
-
'--j-btn-color-1': string;
|
|
4875
|
-
'--j-btn-color-2': string;
|
|
4876
|
-
'--j-btn-color-3': string;
|
|
4877
|
-
'--j-btn-color-4': string;
|
|
4878
|
-
'--j-btn-color-5': string;
|
|
4879
|
-
'--j-btn-color-6': string;
|
|
4880
|
-
}>;
|
|
4879
|
+
computedStyle: ComputedRef<Record<string, string>>;
|
|
4881
4880
|
mergedTooltipConfig: ComputedRef<{
|
|
4882
4881
|
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
4883
4882
|
effect: "dark" | "light";
|
|
@@ -4902,8 +4901,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
4902
4901
|
validator: (value: JTWBtnTypeType) => boolean;
|
|
4903
4902
|
};
|
|
4904
4903
|
color: {
|
|
4905
|
-
type:
|
|
4904
|
+
type: PropType< JTWBtnColorType>;
|
|
4906
4905
|
default: string;
|
|
4906
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
4907
|
+
};
|
|
4908
|
+
textColor: {
|
|
4909
|
+
type: PropType< JTWBtnColorType>;
|
|
4910
|
+
default: undefined;
|
|
4911
|
+
validator: (value: JTWBtnColorType) => boolean;
|
|
4907
4912
|
};
|
|
4908
4913
|
outline: {
|
|
4909
4914
|
type: BooleanConstructor;
|
|
@@ -4934,7 +4939,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
4934
4939
|
}>, {
|
|
4935
4940
|
size: JTWBtnSizeType;
|
|
4936
4941
|
type: JTWBtnTypeType;
|
|
4937
|
-
color:
|
|
4942
|
+
color: JTWBtnColorType;
|
|
4943
|
+
textColor: JTWBtnColorType;
|
|
4938
4944
|
outline: boolean;
|
|
4939
4945
|
flat: boolean;
|
|
4940
4946
|
label: string;
|
package/dist/global.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare module 'vue' {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* JTWConfirmDialog -
|
|
49
|
+
* JTWConfirmDialog - twConfirmDialog 调用选项
|
|
50
50
|
*/
|
|
51
51
|
JTWConfirmDialog: new () => {
|
|
52
52
|
$props: JTWConfirmDialogTemplateProps;
|
|
@@ -64,7 +64,7 @@ declare module 'vue' {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* JTWDialog -
|
|
67
|
+
* JTWDialog - Footer Extra 配置
|
|
68
68
|
*/
|
|
69
69
|
JTWDialog: new () => {
|
|
70
70
|
$props: JTWDialogProps;
|