rtcpts 0.0.7 → 0.0.8
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-c-more-menu/index.d.ts +21 -8
- package/dist/components/j-q-confirm/index.d.ts +90 -2
- package/dist/components/j-q-confirm/types.d.ts +53 -0
- package/dist/components/j-q-input-recognize/index.d.ts +890 -0
- package/dist/components/j-q-table/pagination.d.ts +20 -19
- package/dist/global.d.ts +10 -0
- package/dist/i18n/en-US/index.d.ts +4 -0
- package/dist/i18n/zh-CN/index.d.ts +4 -0
- package/dist/{index-CUxT78y9.cjs → index-B5fTLZL6.cjs} +1 -1
- package/dist/{index-Bfs9ekDA.cjs → index-B8vdsZ5q.cjs} +1 -1
- package/dist/{index-B6SYL1io.js → index-C9vXxoNW.js} +2 -1
- package/dist/{index-BFCvbBQt.js → index-Dd_z446q.js} +2 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/rtcpt-styles.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +1773 -1562
- package/package.json +2 -2
|
@@ -8,6 +8,8 @@ type LabelLike<T> = string | ((ctx: {
|
|
|
8
8
|
type TranslateFn = (key: string, variables?: Record<string, any>) => string;
|
|
9
9
|
export type JCMoreMenuAction<T = any> = {
|
|
10
10
|
key?: string | number;
|
|
11
|
+
/** 用于图标插槽的唯一标识(选填) */
|
|
12
|
+
id?: string;
|
|
11
13
|
/** 权限码;不传则默认当作有权限 */
|
|
12
14
|
permissionCode?: string | null;
|
|
13
15
|
/** 无权限时是否移除 DOM(默认 true) */
|
|
@@ -37,8 +39,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
37
39
|
type: PropType<JCMoreMenuAction<any>[]>;
|
|
38
40
|
default: () => never[];
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
type: PropType<"
|
|
42
|
+
size: {
|
|
43
|
+
type: PropType<"md" | "lg">;
|
|
42
44
|
default: string;
|
|
43
45
|
};
|
|
44
46
|
fit: {
|
|
@@ -54,7 +56,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
54
56
|
default: string;
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
|
-
*
|
|
59
|
+
* size=lg 时生效:默认 offset/anchor/self/minWidth 贴近业务中的写法
|
|
58
60
|
*/
|
|
59
61
|
offset: {
|
|
60
62
|
type: PropType<[number, number]>;
|
|
@@ -80,12 +82,17 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
80
82
|
type: PropType<TranslateFn | undefined>;
|
|
81
83
|
default: undefined;
|
|
82
84
|
};
|
|
85
|
+
showEmptyPlaceholder: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
83
89
|
}>, {
|
|
84
90
|
hasVisibleActions: ComputedRef<boolean>;
|
|
85
91
|
isActionVisible: (action: JCMoreMenuAction<any>) => boolean;
|
|
86
92
|
isActionDisabled: (action: JCMoreMenuAction<any>) => boolean;
|
|
87
93
|
shouldShowAction: (action: JCMoreMenuAction<any>) => boolean;
|
|
88
|
-
|
|
94
|
+
size: ComputedRef<"lg" | "md">;
|
|
95
|
+
showEmptyPlaceholder: ComputedRef<boolean>;
|
|
89
96
|
computedFit: ComputedRef<boolean>;
|
|
90
97
|
computedOffset: ComputedRef<[number, number] | undefined>;
|
|
91
98
|
computedAnchor: ComputedRef<"top middle" | "top left" | "top right" | "top start" | "top end" | "center left" | "center middle" | "center right" | "center start" | "center end" | "bottom left" | "bottom middle" | "bottom right" | "bottom start" | "bottom end" | undefined>;
|
|
@@ -97,6 +104,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
97
104
|
computedMenuAttrs: ComputedRef<Record<string, string | undefined>>;
|
|
98
105
|
getActionLabel: (action: JCMoreMenuAction<any>) => string;
|
|
99
106
|
handleActionClick: (action: JCMoreMenuAction<any>) => Promise<void>;
|
|
107
|
+
hasMenuIconSlot: (action: JCMoreMenuAction<any>) => boolean;
|
|
100
108
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
101
109
|
action: (payload: {
|
|
102
110
|
action: JCMoreMenuAction<any>;
|
|
@@ -111,8 +119,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
111
119
|
type: PropType<JCMoreMenuAction<any>[]>;
|
|
112
120
|
default: () => never[];
|
|
113
121
|
};
|
|
114
|
-
|
|
115
|
-
type: PropType<"
|
|
122
|
+
size: {
|
|
123
|
+
type: PropType<"md" | "lg">;
|
|
116
124
|
default: string;
|
|
117
125
|
};
|
|
118
126
|
fit: {
|
|
@@ -128,7 +136,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
128
136
|
default: string;
|
|
129
137
|
};
|
|
130
138
|
/**
|
|
131
|
-
*
|
|
139
|
+
* size=lg 时生效:默认 offset/anchor/self/minWidth 贴近业务中的写法
|
|
132
140
|
*/
|
|
133
141
|
offset: {
|
|
134
142
|
type: PropType<[number, number]>;
|
|
@@ -154,24 +162,29 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
154
162
|
type: PropType<TranslateFn | undefined>;
|
|
155
163
|
default: undefined;
|
|
156
164
|
};
|
|
165
|
+
showEmptyPlaceholder: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
default: boolean;
|
|
168
|
+
};
|
|
157
169
|
}>> & Readonly<{
|
|
158
170
|
onAction?: ((payload: {
|
|
159
171
|
action: JCMoreMenuAction<any>;
|
|
160
172
|
item: any;
|
|
161
173
|
}) => any) | undefined;
|
|
162
174
|
}>, {
|
|
175
|
+
size: "lg" | "md";
|
|
163
176
|
anchor: "top middle" | "top left" | "top right" | "top start" | "top end" | "center left" | "center middle" | "center right" | "center start" | "center end" | "bottom left" | "bottom middle" | "bottom right" | "bottom start" | "bottom end" | undefined;
|
|
164
177
|
item: any;
|
|
165
178
|
dense: boolean;
|
|
166
179
|
self: "top middle" | "top left" | "top right" | "top start" | "top end" | "center left" | "center middle" | "center right" | "center start" | "center end" | "bottom left" | "bottom middle" | "bottom right" | "bottom start" | "bottom end" | undefined;
|
|
167
180
|
offset: [number, number];
|
|
168
181
|
actions: JCMoreMenuAction<any>[];
|
|
169
|
-
preset: "option" | "action";
|
|
170
182
|
fit: boolean | undefined;
|
|
171
183
|
triggerSize: string;
|
|
172
184
|
listMinWidth: string | undefined;
|
|
173
185
|
menuClass: any;
|
|
174
186
|
translate: TranslateFn | undefined;
|
|
187
|
+
showEmptyPlaceholder: boolean;
|
|
175
188
|
}, {}, {
|
|
176
189
|
QIcon: ComponentConstructor<QIcon>;
|
|
177
190
|
QMenu: ComponentConstructor<QMenu>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SlotsType, DefineComponent, ExtractPropTypes, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { QPopupProxy, QCard, QCardSection, ComponentConstructor } from 'quasar';
|
|
1
|
+
import { SlotsType, DefineComponent, ExtractPropTypes, ComputedRef, ComponentOptionsMixin, PublicProps, PropType, Ref, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { QPopupProxy, QCard, QCardSection, ComponentConstructor, QBtn, QTooltip } from 'quasar';
|
|
3
|
+
import { JQButtonSizeType, JQButtonTypeType, JQButtonSlots } from '../j-q-button/index';
|
|
3
4
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
5
|
title: {
|
|
5
6
|
type: StringConstructor;
|
|
@@ -44,5 +45,92 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
44
45
|
QPopupProxy: ComponentConstructor<QPopupProxy>;
|
|
45
46
|
QCard: ComponentConstructor<QCard>;
|
|
46
47
|
QCardSection: ComponentConstructor<QCardSection>;
|
|
48
|
+
JQButton: DefineComponent<ExtractPropTypes<{
|
|
49
|
+
size: {
|
|
50
|
+
type: PropType<JQButtonSizeType>;
|
|
51
|
+
default: "large";
|
|
52
|
+
validator: (value: JQButtonSizeType) => boolean;
|
|
53
|
+
};
|
|
54
|
+
type: {
|
|
55
|
+
type: PropType<JQButtonTypeType>;
|
|
56
|
+
default: "primary";
|
|
57
|
+
validator: (value: JQButtonTypeType) => boolean;
|
|
58
|
+
};
|
|
59
|
+
label: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
icon: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
loading: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
tips: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
}>, {
|
|
76
|
+
computedClass: ComputedRef<{
|
|
77
|
+
[x: string]: boolean;
|
|
78
|
+
'j-q-button': boolean;
|
|
79
|
+
'j-q-button--primary': boolean;
|
|
80
|
+
'j-q-button--secondary': boolean;
|
|
81
|
+
'j-q-button--text'?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
'j-q-button--text': boolean;
|
|
84
|
+
'j-q-button'?: undefined;
|
|
85
|
+
'j-q-button--primary'?: undefined;
|
|
86
|
+
'j-q-button--secondary'?: undefined;
|
|
87
|
+
}>;
|
|
88
|
+
iconPadding: ComputedRef<{
|
|
89
|
+
'j-q-button-label': string | (() => any) | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
click: (e: Event) => void;
|
|
92
|
+
qBtnRef: Ref< QBtn | null, QBtn | null>;
|
|
93
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
94
|
+
click: (e: Event) => true;
|
|
95
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
96
|
+
size: {
|
|
97
|
+
type: PropType<JQButtonSizeType>;
|
|
98
|
+
default: "large";
|
|
99
|
+
validator: (value: JQButtonSizeType) => boolean;
|
|
100
|
+
};
|
|
101
|
+
type: {
|
|
102
|
+
type: PropType<JQButtonTypeType>;
|
|
103
|
+
default: "primary";
|
|
104
|
+
validator: (value: JQButtonTypeType) => boolean;
|
|
105
|
+
};
|
|
106
|
+
label: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
icon: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
default: undefined;
|
|
113
|
+
};
|
|
114
|
+
loading: {
|
|
115
|
+
type: BooleanConstructor;
|
|
116
|
+
default: boolean;
|
|
117
|
+
};
|
|
118
|
+
tips: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
}>> & Readonly<{
|
|
123
|
+
onClick?: ((e: Event) => any) | undefined;
|
|
124
|
+
}>, {
|
|
125
|
+
type: JQButtonTypeType;
|
|
126
|
+
size: JQButtonSizeType;
|
|
127
|
+
label: string;
|
|
128
|
+
icon: string;
|
|
129
|
+
loading: boolean;
|
|
130
|
+
tips: string;
|
|
131
|
+
}, SlotsType< JQButtonSlots>, {
|
|
132
|
+
QBtn: ComponentConstructor<QBtn>;
|
|
133
|
+
QTooltip: ComponentConstructor<QTooltip>;
|
|
134
|
+
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
47
135
|
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
48
136
|
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** JQConfirm Props 接口 */
|
|
3
|
+
export interface JQConfirmProps {
|
|
4
|
+
/**
|
|
5
|
+
* 确认弹窗标题
|
|
6
|
+
* @default ''
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 确认按钮文字
|
|
11
|
+
* @default '' (使用 i18n 默认值 action.confirm)
|
|
12
|
+
*/
|
|
13
|
+
confirmText?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 取消按钮文字
|
|
16
|
+
* @default '' (使用 i18n 默认值 action.cancel)
|
|
17
|
+
*/
|
|
18
|
+
cancelText?: string;
|
|
19
|
+
}
|
|
20
|
+
/** JQConfirm Emits 接口 */
|
|
21
|
+
export interface JQConfirmEmits {
|
|
22
|
+
/**
|
|
23
|
+
* 确认事件
|
|
24
|
+
* @description 用户点击确认按钮时触发
|
|
25
|
+
*/
|
|
26
|
+
(e: 'confirm'): void;
|
|
27
|
+
}
|
|
28
|
+
/** JQConfirm Slots 接口 */
|
|
29
|
+
export interface JQConfirmSlots {
|
|
30
|
+
/** 默认插槽,用于放置触发弹窗的元素 */
|
|
31
|
+
default?: () => any;
|
|
32
|
+
}
|
|
33
|
+
/** JQConfirm 暴露的方法和属性 */
|
|
34
|
+
export interface JQConfirmExpose {
|
|
35
|
+
/** 获取内部 QPopupProxy 组件的引用 */
|
|
36
|
+
popupRef: any;
|
|
37
|
+
}
|
|
38
|
+
/** Emits 配置对象格式 (用于 DefineComponent) */
|
|
39
|
+
export type JQConfirmEmitsOptions = {
|
|
40
|
+
confirm: () => true;
|
|
41
|
+
};
|
|
42
|
+
/** JQConfirm 组件类型定义 */
|
|
43
|
+
export type JQConfirmComponent = DefineComponent<JQConfirmProps, JQConfirmExpose, {}, {}, {}, {}, {}, JQConfirmEmitsOptions>;
|
|
44
|
+
/** JQConfirm 实例类型 - 用于 ref 类型定义 */
|
|
45
|
+
export type JQConfirmInstance = InstanceType<JQConfirmComponent> & JQConfirmExpose;
|
|
46
|
+
/**
|
|
47
|
+
* 用于模板中的 Props 类型定义
|
|
48
|
+
* 包含事件处理器和插槽
|
|
49
|
+
*/
|
|
50
|
+
export interface JQConfirmTemplateProps extends JQConfirmProps {
|
|
51
|
+
/** 确认事件处理器 */
|
|
52
|
+
onConfirm?: () => void;
|
|
53
|
+
}
|