rtcpts 0.0.68 → 0.0.70
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-q-confirm-dialog/index.d.ts +16 -15
- package/dist/components/j-q-pagination/types.d.ts +12 -6
- package/dist/components/j-q-table/index.d.ts +99 -46
- package/dist/components/j-q-table/pagination.d.ts +0 -33
- package/dist/components/j-q-table/types.d.ts +10 -25
- package/dist/index.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +3810 -3865
- package/package.json +1 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { QVueGlobals } from 'quasar';
|
|
2
|
+
import { JQConfirmDialogShowParams, IJQConfirmDialog } from './types';
|
|
3
|
+
export type { JQConfirmDialogShowParams, IJQConfirmDialog } from './types';
|
|
4
|
+
declare class GlobalConfirm implements IJQConfirmDialog {
|
|
5
|
+
/**
|
|
6
|
+
* 设置 Quasar 实例(在 rtcptInit 中调用)
|
|
7
|
+
*/
|
|
8
|
+
setQuasarInstance(instance: QVueGlobals): void;
|
|
9
|
+
/**
|
|
10
|
+
* 弹出自定义确认对话框,返回一个 Promise,resolve(true) 表示确定,resolve(false) 表示取消/关闭。
|
|
11
|
+
*/
|
|
12
|
+
show({ title, color, content, confirmButtonText, cancelButtonText, showCancelButton, isDelete, icon, showClose }: JQConfirmDialogShowParams): Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
declare const globalConfirm: GlobalConfirm;
|
|
15
|
+
export default globalConfirm;
|
|
16
|
+
type: StringConstructor;
|
|
16
17
|
default: string;
|
|
17
18
|
};
|
|
18
19
|
cancelButtonText: {
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { DefineComponent, SlotsType } from 'vue';
|
|
2
|
-
/** 默认每页显示数量 */
|
|
3
|
-
export declare const DEFAULT_PAGE_SIZE: 20;
|
|
4
|
-
/** 默认每页显示数量选项 */
|
|
5
|
-
export declare const DEFAULT_PAGE_SIZE_OPTIONS: readonly [20, 50, 100, 200];
|
|
6
2
|
/** 分页配置接口 */
|
|
7
3
|
export interface PaginationConfig {
|
|
8
4
|
/** 当前页码 */
|
|
@@ -21,7 +17,7 @@ export interface JQPaginationProps {
|
|
|
21
17
|
currentPage?: number;
|
|
22
18
|
/**
|
|
23
19
|
* 每页显示数量
|
|
24
|
-
* @default
|
|
20
|
+
* @default 15
|
|
25
21
|
*/
|
|
26
22
|
pageSize?: number;
|
|
27
23
|
/**
|
|
@@ -31,9 +27,19 @@ export interface JQPaginationProps {
|
|
|
31
27
|
total?: number;
|
|
32
28
|
/**
|
|
33
29
|
* 每页显示数量选项
|
|
34
|
-
* @default [
|
|
30
|
+
* @default [10, 15, 20, 30, 50]
|
|
35
31
|
*/
|
|
36
32
|
pageSizeOptions?: number[];
|
|
33
|
+
/**
|
|
34
|
+
* mini 模式:仅显示页码导航,隐藏总数、每页条数选择、跳转输入框
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
mini?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 加载状态:为 true 时禁用所有分页控件交互
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
loading?: boolean;
|
|
37
43
|
}
|
|
38
44
|
/** JQPagination Emits 接口 */
|
|
39
45
|
export interface JQPaginationEmits {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropType, SlotsType, DefineComponent, ExtractPropTypes, Ref, WritableComputedRef, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, VNode, RendererNode, RendererElement } from 'vue';
|
|
2
|
-
import { QTable, QTh, QTd, QInnerLoading, QTableColumn, ComponentConstructor, QSelect, QPagination, QInput } from 'quasar';
|
|
2
|
+
import { QTable, QTh, QTd, QInnerLoading, QCheckbox, QTableColumn, ComponentConstructor, QSelect, QPagination, QInput } from 'quasar';
|
|
3
|
+
import { PaginationConfig } from '../j-q-pagination/types';
|
|
3
4
|
import { t } from '../../composables/useI18n.ts';
|
|
4
|
-
import { Paginator, PaginationParameter
|
|
5
|
+
import { Paginator, PaginationParameter } from './pagination';
|
|
5
6
|
import { JCTooltipPlacementType, JCTooltipEffectType, JCTooltipTriggerType } from '../..';
|
|
6
7
|
export interface SelectionConditions {
|
|
7
8
|
itemSelectDisable: (data: any) => boolean;
|
|
@@ -11,10 +12,6 @@ export interface TableColumn extends Partial<QTableColumn> {
|
|
|
11
12
|
[key: string]: any;
|
|
12
13
|
}
|
|
13
14
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
14
|
-
autoHeight: {
|
|
15
|
-
type: BooleanConstructor;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
15
|
autoScrollOnChangePage: {
|
|
19
16
|
type: BooleanConstructor;
|
|
20
17
|
default: boolean;
|
|
@@ -55,9 +52,17 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
55
52
|
type: BooleanConstructor;
|
|
56
53
|
default: boolean;
|
|
57
54
|
};
|
|
55
|
+
paginationLoading: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
58
59
|
rowKey: {
|
|
59
60
|
default: string;
|
|
60
61
|
};
|
|
62
|
+
selection: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
61
66
|
rows: {
|
|
62
67
|
type: ArrayConstructor;
|
|
63
68
|
default: () => never[];
|
|
@@ -94,12 +99,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
94
99
|
setNum: (value?: number) => void;
|
|
95
100
|
setTotal: (value?: number) => void;
|
|
96
101
|
setSize: (value?: number) => void;
|
|
97
|
-
|
|
102
|
+
disablePagination: ComputedRef<{
|
|
98
103
|
rowsPerPage: number;
|
|
99
104
|
}>;
|
|
100
|
-
|
|
101
|
-
changeSize: () => void;
|
|
102
|
-
onPaginationChange: (data: any) => void;
|
|
105
|
+
onPaginationChange: (data: PaginationConfig) => void;
|
|
103
106
|
formatColumnValue: (col: any, value: any) => string;
|
|
104
107
|
handleColumnClick: (col: any, row: any) => void;
|
|
105
108
|
isClickable: (col: any, value: any, row: any) => any;
|
|
@@ -121,14 +124,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
121
124
|
'--cell-max-width-small'?: undefined;
|
|
122
125
|
'--cell-max-width'?: undefined;
|
|
123
126
|
};
|
|
127
|
+
getRowClass: (row: any) => "" | "j-q-table--selection-disabled";
|
|
128
|
+
isRowSelectionDisabled: (row: any) => boolean;
|
|
129
|
+
isHeaderIndeterminate: ComputedRef<boolean>;
|
|
124
130
|
setEllipsisRef: (el: any, key: string) => void;
|
|
125
131
|
shouldShowTooltip: (key: string) => boolean;
|
|
126
132
|
columnConstrained: Ref<Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>, Map<string, boolean> | (Map<string, boolean> & Omit<Map<string, boolean>, keyof Map<any, any>>)>;
|
|
127
133
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
128
|
-
autoHeight: {
|
|
129
|
-
type: BooleanConstructor;
|
|
130
|
-
default: boolean;
|
|
131
|
-
};
|
|
132
134
|
autoScrollOnChangePage: {
|
|
133
135
|
type: BooleanConstructor;
|
|
134
136
|
default: boolean;
|
|
@@ -169,9 +171,17 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
169
171
|
type: BooleanConstructor;
|
|
170
172
|
default: boolean;
|
|
171
173
|
};
|
|
174
|
+
paginationLoading: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
default: boolean;
|
|
177
|
+
};
|
|
172
178
|
rowKey: {
|
|
173
179
|
default: string;
|
|
174
180
|
};
|
|
181
|
+
selection: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
175
185
|
rows: {
|
|
176
186
|
type: ArrayConstructor;
|
|
177
187
|
default: () => never[];
|
|
@@ -198,13 +208,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
198
208
|
columns: any[];
|
|
199
209
|
rows: unknown[];
|
|
200
210
|
rowKey: string;
|
|
201
|
-
autoHeight: boolean;
|
|
202
211
|
autoScrollOnChangePage: boolean;
|
|
203
212
|
cellMaxWidth: number;
|
|
204
213
|
cellMaxWidthSmall: number;
|
|
205
214
|
emptyDesc: string;
|
|
206
215
|
emptyTitle: string;
|
|
207
216
|
hidePagination: boolean;
|
|
217
|
+
paginationLoading: boolean;
|
|
218
|
+
selection: boolean;
|
|
208
219
|
selectionConditions: SelectionConditions | null;
|
|
209
220
|
}, SlotsType<{
|
|
210
221
|
top?: void | undefined;
|
|
@@ -213,49 +224,90 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
213
224
|
append?: void | undefined;
|
|
214
225
|
'empty-actions'?: void | undefined;
|
|
215
226
|
} & Record<`header-cell-${string}`, any> & Record<`body-cell-${string}`, any>>, {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
type:
|
|
219
|
-
default:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
227
|
+
JQPagination: DefineComponent<ExtractPropTypes<{
|
|
228
|
+
currentPage: {
|
|
229
|
+
type: NumberConstructor;
|
|
230
|
+
default: number;
|
|
231
|
+
};
|
|
232
|
+
pageSize: {
|
|
233
|
+
type: NumberConstructor;
|
|
234
|
+
default: number;
|
|
235
|
+
};
|
|
236
|
+
total: {
|
|
237
|
+
type: NumberConstructor;
|
|
238
|
+
default: number;
|
|
239
|
+
};
|
|
240
|
+
pageSizeOptions: {
|
|
241
|
+
type: () => number[];
|
|
242
|
+
default: () => number[];
|
|
243
|
+
};
|
|
244
|
+
mini: {
|
|
245
|
+
type: BooleanConstructor;
|
|
246
|
+
default: boolean;
|
|
247
|
+
};
|
|
248
|
+
loading: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
default: boolean;
|
|
224
251
|
};
|
|
225
252
|
}>, {
|
|
226
253
|
t: t;
|
|
227
254
|
internalInfo: {
|
|
228
|
-
|
|
229
|
-
currentPage:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
rowsNumber: number;
|
|
255
|
+
inputPage: string | number;
|
|
256
|
+
currentPage: number;
|
|
257
|
+
pageSize: number;
|
|
258
|
+
total: number;
|
|
233
259
|
};
|
|
234
|
-
|
|
260
|
+
loading: Ref<boolean, boolean>;
|
|
261
|
+
mini: Ref<boolean, boolean>;
|
|
262
|
+
maxPages: ComputedRef<5 | 6>;
|
|
263
|
+
totalPages: ComputedRef<number>;
|
|
264
|
+
pagePlaceholder: ComputedRef<string>;
|
|
265
|
+
pageMask: ComputedRef<string>;
|
|
266
|
+
pageSizeOptions: ComputedRef<{
|
|
235
267
|
label: string;
|
|
236
268
|
value: number;
|
|
237
|
-
}[]
|
|
238
|
-
|
|
239
|
-
currentPageMask: ComputedRef<string>;
|
|
240
|
-
maxPage: ComputedRef<number>;
|
|
241
|
-
handleRowsPerPageChange: () => void;
|
|
269
|
+
}[]>;
|
|
270
|
+
handlePageSizeChange: () => void;
|
|
242
271
|
handlePageChange: () => void;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
272
|
+
handleJumpToPage: () => void;
|
|
273
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:currentPage" | "update:pageSize")[], "change" | "update:currentPage" | "update:pageSize", PublicProps, Readonly< ExtractPropTypes<{
|
|
274
|
+
currentPage: {
|
|
275
|
+
type: NumberConstructor;
|
|
276
|
+
default: number;
|
|
277
|
+
};
|
|
278
|
+
pageSize: {
|
|
279
|
+
type: NumberConstructor;
|
|
280
|
+
default: number;
|
|
281
|
+
};
|
|
282
|
+
total: {
|
|
283
|
+
type: NumberConstructor;
|
|
284
|
+
default: number;
|
|
285
|
+
};
|
|
286
|
+
pageSizeOptions: {
|
|
287
|
+
type: () => number[];
|
|
288
|
+
default: () => number[];
|
|
289
|
+
};
|
|
290
|
+
mini: {
|
|
291
|
+
type: BooleanConstructor;
|
|
292
|
+
default: boolean;
|
|
293
|
+
};
|
|
294
|
+
loading: {
|
|
295
|
+
type: BooleanConstructor;
|
|
296
|
+
default: boolean;
|
|
253
297
|
};
|
|
254
298
|
}>> & Readonly<{
|
|
255
|
-
|
|
299
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
300
|
+
"onUpdate:currentPage"?: ((...args: any[]) => any) | undefined;
|
|
301
|
+
"onUpdate:pageSize"?: ((...args: any[]) => any) | undefined;
|
|
256
302
|
}>, {
|
|
257
|
-
|
|
303
|
+
loading: boolean;
|
|
304
|
+
total: number;
|
|
305
|
+
currentPage: number;
|
|
306
|
+
pageSize: number;
|
|
307
|
+
pageSizeOptions: number[];
|
|
308
|
+
mini: boolean;
|
|
258
309
|
}, {}, {
|
|
310
|
+
QInnerLoading: ComponentConstructor<QInnerLoading>;
|
|
259
311
|
QSelect: ComponentConstructor<QSelect>;
|
|
260
312
|
QPagination: ComponentConstructor<QPagination>;
|
|
261
313
|
QInput: ComponentConstructor<QInput>;
|
|
@@ -264,6 +316,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
264
316
|
QTh: ComponentConstructor<QTh>;
|
|
265
317
|
QTd: ComponentConstructor<QTd>;
|
|
266
318
|
QInnerLoading: ComponentConstructor<QInnerLoading>;
|
|
319
|
+
QCheckbox: ComponentConstructor<QCheckbox>;
|
|
267
320
|
JCTooltip: DefineComponent<ExtractPropTypes<{
|
|
268
321
|
content: {
|
|
269
322
|
type: StringConstructor;
|
|
@@ -20,36 +20,3 @@ export type UsePaginationReturn = {
|
|
|
20
20
|
export declare const DEFAULT_ROWS_PER_PAGE = 15;
|
|
21
21
|
export declare const ROWS_PER_PAGE_OPTIONS: number[];
|
|
22
22
|
export declare function usePagination(options?: UsePaginationOptions): UsePaginationReturn;
|
|
23
|
-
rowsPerPage: number;
|
|
24
|
-
rowsNumber: number;
|
|
25
|
-
};
|
|
26
|
-
rowNumbersArr: {
|
|
27
|
-
label: string;
|
|
28
|
-
value: number;
|
|
29
|
-
}[];
|
|
30
|
-
currentPagePlaceholder: ComputedRef<string>;
|
|
31
|
-
currentPageMask: ComputedRef<string>;
|
|
32
|
-
maxPage: ComputedRef<number>;
|
|
33
|
-
handleRowsPerPageChange: () => void;
|
|
34
|
-
handlePageChange: () => void;
|
|
35
|
-
paginationInput: () => void;
|
|
36
|
-
selectChange: () => void;
|
|
37
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "pagination"[], "pagination", PublicProps, Readonly< ExtractPropTypes<{
|
|
38
|
-
paginationInfo: {
|
|
39
|
-
type: () => PaginationInfo;
|
|
40
|
-
default: () => {
|
|
41
|
-
page: number;
|
|
42
|
-
rowsPerPage: number;
|
|
43
|
-
rowsNumber: number;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}>> & Readonly<{
|
|
47
|
-
onPagination?: ((...args: any[]) => any) | undefined;
|
|
48
|
-
}>, {
|
|
49
|
-
paginationInfo: PaginationInfo;
|
|
50
|
-
}, {}, {
|
|
51
|
-
QSelect: ComponentConstructor<QSelect>;
|
|
52
|
-
QPagination: ComponentConstructor<QPagination>;
|
|
53
|
-
QInput: ComponentConstructor<QInput>;
|
|
54
|
-
}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
55
|
-
export default _default;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { DefineComponent, SlotsType } from 'vue';
|
|
2
2
|
import { QTableColumn } from 'quasar';
|
|
3
|
-
/** 默认每页行数 */
|
|
4
|
-
export declare const DEFAULT_ROWS_PER_PAGE: 20;
|
|
5
|
-
/** 每页行数选项 */
|
|
6
|
-
export declare const ROWS_PER_PAGE_OPTIONS: readonly [20, 50, 100, 200];
|
|
7
3
|
/** 选择条件接口 */
|
|
8
4
|
export interface SelectionConditions {
|
|
9
5
|
/** 禁用项选择判断函数 */
|
|
@@ -31,11 +27,6 @@ export interface TableColumn extends Partial<QTableColumn> {
|
|
|
31
27
|
}
|
|
32
28
|
/** JQTable Props 接口 */
|
|
33
29
|
export interface JQTableProps {
|
|
34
|
-
/**
|
|
35
|
-
* 是否自动高度
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
autoHeight?: boolean;
|
|
39
30
|
/**
|
|
40
31
|
* 切换页面时是否自动滚动
|
|
41
32
|
* @default true
|
|
@@ -85,11 +76,21 @@ export interface JQTableProps {
|
|
|
85
76
|
* @default false
|
|
86
77
|
*/
|
|
87
78
|
loading?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 分页加载状态:为 true 时禁用分页控件交互
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
paginationLoading?: boolean;
|
|
88
84
|
/**
|
|
89
85
|
* 行键名
|
|
90
86
|
* @default 'id'
|
|
91
87
|
*/
|
|
92
88
|
rowKey?: string | number;
|
|
89
|
+
/**
|
|
90
|
+
* 是否开启行选择功能
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
selection?: boolean;
|
|
93
94
|
/**
|
|
94
95
|
* 行数据数组
|
|
95
96
|
* @default []
|
|
@@ -122,16 +123,6 @@ export interface JQTableEmits {
|
|
|
122
123
|
* @param value 选中的行数据
|
|
123
124
|
*/
|
|
124
125
|
(e: 'update:selected', value: any[]): void;
|
|
125
|
-
/**
|
|
126
|
-
* 切换页码事件
|
|
127
|
-
* @param paginationInfo 分页信息
|
|
128
|
-
*/
|
|
129
|
-
(e: 'changeNum', paginationInfo: any): void;
|
|
130
|
-
/**
|
|
131
|
-
* 切换每页数量事件
|
|
132
|
-
* @param paginationInfo 分页信息
|
|
133
|
-
*/
|
|
134
|
-
(e: 'changeSize', paginationInfo: any): void;
|
|
135
126
|
/**
|
|
136
127
|
* 分页变化事件
|
|
137
128
|
* @param data 分页数据
|
|
@@ -204,8 +195,6 @@ export interface JQTableExpose {
|
|
|
204
195
|
/** JQTable 组件类型定义 */
|
|
205
196
|
export type JQTableComponent = DefineComponent<JQTableProps, JQTableExpose, {}, {}, {}, {}, SlotsType<JQTableSlots>, {
|
|
206
197
|
'update:selected': (value: any[]) => true;
|
|
207
|
-
changeNum: (paginationInfo: any) => true;
|
|
208
|
-
changeSize: (paginationInfo: any) => true;
|
|
209
198
|
paginationChange: (data: any) => true;
|
|
210
199
|
}>;
|
|
211
200
|
/** JQTable 实例类型 - 用于 ref 类型定义 */
|
|
@@ -217,10 +206,6 @@ export type JQTableInstance = InstanceType<JQTableComponent> & JQTableExpose;
|
|
|
217
206
|
export interface JQTableTemplateProps extends JQTableProps {
|
|
218
207
|
/** 更新选中项事件处理器 */
|
|
219
208
|
'onUpdate:selected'?: (value: any[]) => void;
|
|
220
|
-
/** 切换页码事件处理器 */
|
|
221
|
-
onChangeNum?: (paginationInfo: any) => void;
|
|
222
|
-
/** 切换每页数量事件处理器 */
|
|
223
|
-
onChangeSize?: (paginationInfo: any) => void;
|
|
224
209
|
/** 分页变化事件处理器 */
|
|
225
210
|
onPaginationChange?: (data: any) => void;
|
|
226
211
|
}
|