rtcpts 0.0.68 → 0.0.69

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.
@@ -1,18 +1,19 @@
1
- import { QCard, QCardSection, QDialog, QIcon, ComponentConstructor, QBtn } from 'quasar';
2
- import { PropType, VNode, Component as VueComponent, DefineComponent, ExtractPropTypes, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, SlotsType, ComponentProvideOptions } from 'vue';
3
- import { JQButtonSizeType, JQButtonTypeType, JQButtonSlots } from '../j-q-button/index';
4
- import { JCTooltipProps, JCTooltipPlacementType, JCTooltipEffectType, JCTooltipTriggerType } from '../..';
5
- declare const _default: DefineComponent<ExtractPropTypes<{
6
- title: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- content: {
11
- type: StringConstructor;
12
- default: string;
13
- };
14
- confirmButtonText: {
15
- type: StringConstructor;
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
20
+ * @default 15
25
21
  */
26
22
  pageSize?: number;
27
23
  /**
@@ -31,9 +27,14 @@ export interface JQPaginationProps {
31
27
  total?: number;
32
28
  /**
33
29
  * 每页显示数量选项
34
- * @default [20, 50, 100, 200]
30
+ * @default [10, 15, 20, 30, 50]
35
31
  */
36
32
  pageSizeOptions?: number[];
33
+ /**
34
+ * mini 模式:仅显示页码导航,隐藏总数、每页条数选择、跳转输入框
35
+ * @default false
36
+ */
37
+ mini?: boolean;
37
38
  }
38
39
  /** JQPagination Emits 接口 */
39
40
  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, PaginationInfo } from './pagination';
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;
@@ -58,6 +55,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
58
55
  rowKey: {
59
56
  default: string;
60
57
  };
58
+ selection: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
61
62
  rows: {
62
63
  type: ArrayConstructor;
63
64
  default: () => never[];
@@ -94,12 +95,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
94
95
  setNum: (value?: number) => void;
95
96
  setTotal: (value?: number) => void;
96
97
  setSize: (value?: number) => void;
97
- clacPagination: ComputedRef<{
98
+ disablePagination: ComputedRef<{
98
99
  rowsPerPage: number;
99
100
  }>;
100
- changeNum: () => void;
101
- changeSize: () => void;
102
- onPaginationChange: (data: any) => void;
101
+ onPaginationChange: (data: PaginationConfig) => void;
103
102
  formatColumnValue: (col: any, value: any) => string;
104
103
  handleColumnClick: (col: any, row: any) => void;
105
104
  isClickable: (col: any, value: any, row: any) => any;
@@ -121,14 +120,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
121
120
  '--cell-max-width-small'?: undefined;
122
121
  '--cell-max-width'?: undefined;
123
122
  };
123
+ getRowClass: (row: any) => "" | "j-q-table--selection-disabled";
124
+ isRowSelectionDisabled: (row: any) => boolean;
125
+ isHeaderIndeterminate: ComputedRef<boolean>;
124
126
  setEllipsisRef: (el: any, key: string) => void;
125
127
  shouldShowTooltip: (key: string) => boolean;
126
128
  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
129
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
128
- autoHeight: {
129
- type: BooleanConstructor;
130
- default: boolean;
131
- };
132
130
  autoScrollOnChangePage: {
133
131
  type: BooleanConstructor;
134
132
  default: boolean;
@@ -172,6 +170,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
172
170
  rowKey: {
173
171
  default: string;
174
172
  };
173
+ selection: {
174
+ type: BooleanConstructor;
175
+ default: boolean;
176
+ };
175
177
  rows: {
176
178
  type: ArrayConstructor;
177
179
  default: () => never[];
@@ -198,13 +200,13 @@ declare const _default: DefineComponent<ExtractPropTypes<{
198
200
  columns: any[];
199
201
  rows: unknown[];
200
202
  rowKey: string;
201
- autoHeight: boolean;
202
203
  autoScrollOnChangePage: boolean;
203
204
  cellMaxWidth: number;
204
205
  cellMaxWidthSmall: number;
205
206
  emptyDesc: string;
206
207
  emptyTitle: string;
207
208
  hidePagination: boolean;
209
+ selection: boolean;
208
210
  selectionConditions: SelectionConditions | null;
209
211
  }, SlotsType<{
210
212
  top?: void | undefined;
@@ -213,48 +215,78 @@ declare const _default: DefineComponent<ExtractPropTypes<{
213
215
  append?: void | undefined;
214
216
  'empty-actions'?: void | undefined;
215
217
  } & Record<`header-cell-${string}`, any> & Record<`body-cell-${string}`, any>>, {
216
- Pagination: DefineComponent<ExtractPropTypes<{
217
- paginationInfo: {
218
- type: () => PaginationInfo;
219
- default: () => {
220
- page: number;
221
- rowsPerPage: number;
222
- rowsNumber: number;
223
- };
218
+ JQPagination: DefineComponent<ExtractPropTypes<{
219
+ currentPage: {
220
+ type: NumberConstructor;
221
+ default: number;
222
+ };
223
+ pageSize: {
224
+ type: NumberConstructor;
225
+ default: number;
226
+ };
227
+ total: {
228
+ type: NumberConstructor;
229
+ default: number;
230
+ };
231
+ pageSizeOptions: {
232
+ type: () => number[];
233
+ default: () => number[];
234
+ };
235
+ mini: {
236
+ type: BooleanConstructor;
237
+ default: boolean;
224
238
  };
225
239
  }>, {
226
240
  t: t;
227
241
  internalInfo: {
228
- totalPage: number;
229
- currentPage: string | number;
230
- page: number;
231
- rowsPerPage: number;
232
- rowsNumber: number;
242
+ inputPage: string | number;
243
+ currentPage: number;
244
+ pageSize: number;
245
+ total: number;
233
246
  };
234
- rowNumbersArr: {
247
+ mini: boolean;
248
+ maxPages: ComputedRef<5 | 6>;
249
+ totalPages: ComputedRef<number>;
250
+ pagePlaceholder: ComputedRef<string>;
251
+ pageMask: ComputedRef<string>;
252
+ pageSizeOptions: ComputedRef<{
235
253
  label: string;
236
254
  value: number;
237
- }[];
238
- currentPagePlaceholder: ComputedRef<string>;
239
- currentPageMask: ComputedRef<string>;
240
- maxPage: ComputedRef<number>;
241
- handleRowsPerPageChange: () => void;
255
+ }[]>;
256
+ handlePageSizeChange: () => void;
242
257
  handlePageChange: () => void;
243
- paginationInput: () => void;
244
- selectChange: () => void;
245
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "pagination"[], "pagination", PublicProps, Readonly< ExtractPropTypes<{
246
- paginationInfo: {
247
- type: () => PaginationInfo;
248
- default: () => {
249
- page: number;
250
- rowsPerPage: number;
251
- rowsNumber: number;
252
- };
258
+ handleJumpToPage: () => void;
259
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "update:currentPage" | "update:pageSize")[], "change" | "update:currentPage" | "update:pageSize", PublicProps, Readonly< ExtractPropTypes<{
260
+ currentPage: {
261
+ type: NumberConstructor;
262
+ default: number;
263
+ };
264
+ pageSize: {
265
+ type: NumberConstructor;
266
+ default: number;
267
+ };
268
+ total: {
269
+ type: NumberConstructor;
270
+ default: number;
271
+ };
272
+ pageSizeOptions: {
273
+ type: () => number[];
274
+ default: () => number[];
275
+ };
276
+ mini: {
277
+ type: BooleanConstructor;
278
+ default: boolean;
253
279
  };
254
280
  }>> & Readonly<{
255
- onPagination?: ((...args: any[]) => any) | undefined;
281
+ onChange?: ((...args: any[]) => any) | undefined;
282
+ "onUpdate:currentPage"?: ((...args: any[]) => any) | undefined;
283
+ "onUpdate:pageSize"?: ((...args: any[]) => any) | undefined;
256
284
  }>, {
257
- paginationInfo: PaginationInfo;
285
+ total: number;
286
+ currentPage: number;
287
+ pageSize: number;
288
+ pageSizeOptions: number[];
289
+ mini: boolean;
258
290
  }, {}, {
259
291
  QSelect: ComponentConstructor<QSelect>;
260
292
  QPagination: ComponentConstructor<QPagination>;
@@ -264,6 +296,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
264
296
  QTh: ComponentConstructor<QTh>;
265
297
  QTd: ComponentConstructor<QTd>;
266
298
  QInnerLoading: ComponentConstructor<QInnerLoading>;
299
+ QCheckbox: ComponentConstructor<QCheckbox>;
267
300
  JCTooltip: DefineComponent<ExtractPropTypes<{
268
301
  content: {
269
302
  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
@@ -90,6 +81,11 @@ export interface JQTableProps {
90
81
  * @default 'id'
91
82
  */
92
83
  rowKey?: string | number;
84
+ /**
85
+ * 是否开启行选择功能
86
+ * @default false
87
+ */
88
+ selection?: boolean;
93
89
  /**
94
90
  * 行数据数组
95
91
  * @default []
@@ -122,16 +118,6 @@ export interface JQTableEmits {
122
118
  * @param value 选中的行数据
123
119
  */
124
120
  (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
121
  /**
136
122
  * 分页变化事件
137
123
  * @param data 分页数据
@@ -204,8 +190,6 @@ export interface JQTableExpose {
204
190
  /** JQTable 组件类型定义 */
205
191
  export type JQTableComponent = DefineComponent<JQTableProps, JQTableExpose, {}, {}, {}, {}, SlotsType<JQTableSlots>, {
206
192
  'update:selected': (value: any[]) => true;
207
- changeNum: (paginationInfo: any) => true;
208
- changeSize: (paginationInfo: any) => true;
209
193
  paginationChange: (data: any) => true;
210
194
  }>;
211
195
  /** JQTable 实例类型 - 用于 ref 类型定义 */
@@ -217,10 +201,6 @@ export type JQTableInstance = InstanceType<JQTableComponent> & JQTableExpose;
217
201
  export interface JQTableTemplateProps extends JQTableProps {
218
202
  /** 更新选中项事件处理器 */
219
203
  'onUpdate:selected'?: (value: any[]) => void;
220
- /** 切换页码事件处理器 */
221
- onChangeNum?: (paginationInfo: any) => void;
222
- /** 切换每页数量事件处理器 */
223
- onChangeSize?: (paginationInfo: any) => void;
224
204
  /** 分页变化事件处理器 */
225
205
  onPaginationChange?: (data: any) => void;
226
206
  }