cc1-form 1.1.42 → 1.2.0

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.
@@ -48,7 +48,11 @@ declare const conf: {
48
48
  table?: {
49
49
  rowKey?: string | undefined;
50
50
  border?: boolean | undefined;
51
- selectable?: boolean | ((data: any) => boolean) | undefined;
51
+ selectable?: boolean | ((data: any) => boolean) | {
52
+ [x: string]: any;
53
+ show?: boolean | ((data: any) => boolean) | undefined;
54
+ on?: any;
55
+ } | undefined;
52
56
  column?: {
53
57
  key: string;
54
58
  label: string;
@@ -446,12 +450,20 @@ declare const conf: {
446
450
  delete?: boolean | ((data: any) => boolean) | undefined;
447
451
  export?: {
448
452
  show?: boolean | undefined;
453
+ dropdown?: {
454
+ show?: boolean | undefined;
455
+ select?: boolean | undefined;
456
+ page?: boolean | undefined;
457
+ all?: boolean | undefined;
458
+ } | undefined;
449
459
  fileName?: string | (() => string) | undefined;
450
460
  before?: ((param: {
451
461
  data: any[];
452
462
  columns: import("./indexType").CurdConfigColumn<any>[];
453
463
  }) => void) | undefined;
464
+ select?: ((param: any) => any) | undefined;
454
465
  all?: ((param: any) => any) | undefined;
466
+ page?: ((param: any) => any) | undefined;
455
467
  } | undefined;
456
468
  } | undefined;
457
469
  form?: {
@@ -1234,6 +1246,10 @@ declare const conf: {
1234
1246
  size: number;
1235
1247
  sizeList: number[];
1236
1248
  pagerCount: number;
1249
+ getQuery: (param?: {
1250
+ size?: number;
1251
+ num?: number;
1252
+ }) => any;
1237
1253
  };
1238
1254
  table: {
1239
1255
  op: {
@@ -1641,8 +1657,8 @@ declare const conf: {
1641
1657
  export: {
1642
1658
  run: {
1643
1659
  start: (command: any) => Promise<void>;
1644
- select: () => any[];
1645
- page: () => any[];
1660
+ select: () => Promise<any[] | undefined>;
1661
+ page: () => Promise<any[] | undefined>;
1646
1662
  all: () => Promise<any>;
1647
1663
  };
1648
1664
  loading: boolean;
@@ -2080,15 +2096,15 @@ declare var __VLS_1: {}, __VLS_7: {
2080
2096
  row: Record<string, any>;
2081
2097
  }, __VLS_75: {
2082
2098
  row: Record<string, any>;
2083
- }, __VLS_129: {}, __VLS_131: {}, __VLS_163: string | number, __VLS_164: any, __VLS_170: {}, __VLS_176: {
2099
+ }, __VLS_137: {}, __VLS_139: {}, __VLS_171: string | number, __VLS_172: any, __VLS_178: {}, __VLS_184: {
2084
2100
  row: any;
2085
- }, __VLS_194: {
2101
+ }, __VLS_202: {
2086
2102
  row: any;
2087
- }, __VLS_228: {
2103
+ }, __VLS_236: {
2088
2104
  row: any;
2089
- }, __VLS_239: {}, __VLS_251: {
2105
+ }, __VLS_247: {}, __VLS_259: {
2090
2106
  row: any;
2091
- }, __VLS_257: string | number, __VLS_258: {
2107
+ }, __VLS_265: string | number, __VLS_266: {
2092
2108
  row: any;
2093
2109
  item: {
2094
2110
  key: string;
@@ -2460,7 +2476,7 @@ declare var __VLS_1: {}, __VLS_7: {
2460
2476
  form?: number | undefined;
2461
2477
  } | undefined;
2462
2478
  };
2463
- }, __VLS_260: {
2479
+ }, __VLS_268: {
2464
2480
  row: any;
2465
2481
  };
2466
2482
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
@@ -2468,9 +2484,9 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
2468
2484
  } & {
2469
2485
  [K in NonNullable<typeof __VLS_50>]?: (props: typeof __VLS_51) => any;
2470
2486
  } & {
2471
- [K in NonNullable<typeof __VLS_163>]?: (props: typeof __VLS_164) => any;
2487
+ [K in NonNullable<typeof __VLS_171>]?: (props: typeof __VLS_172) => any;
2472
2488
  } & {
2473
- [K in NonNullable<typeof __VLS_257>]?: (props: typeof __VLS_258) => any;
2489
+ [K in NonNullable<typeof __VLS_265>]?: (props: typeof __VLS_266) => any;
2474
2490
  } & {
2475
2491
  'box-left'?: (props: typeof __VLS_1) => any;
2476
2492
  } & {
@@ -2480,23 +2496,23 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
2480
2496
  } & {
2481
2497
  'search-end'?: (props: typeof __VLS_75) => any;
2482
2498
  } & {
2483
- 'tools-left'?: (props: typeof __VLS_129) => any;
2499
+ 'tools-left'?: (props: typeof __VLS_137) => any;
2484
2500
  } & {
2485
- 'tools-right'?: (props: typeof __VLS_131) => any;
2501
+ 'tools-right'?: (props: typeof __VLS_139) => any;
2486
2502
  } & {
2487
- 'table-header-op'?: (props: typeof __VLS_170) => any;
2503
+ 'table-header-op'?: (props: typeof __VLS_178) => any;
2488
2504
  } & {
2489
- 'table-op-left'?: (props: typeof __VLS_176) => any;
2505
+ 'table-op-left'?: (props: typeof __VLS_184) => any;
2490
2506
  } & {
2491
- 'table-op-edit-right'?: (props: typeof __VLS_194) => any;
2507
+ 'table-op-edit-right'?: (props: typeof __VLS_202) => any;
2492
2508
  } & {
2493
- 'table-op-right'?: (props: typeof __VLS_228) => any;
2509
+ 'table-op-right'?: (props: typeof __VLS_236) => any;
2494
2510
  } & {
2495
- 'box-right'?: (props: typeof __VLS_239) => any;
2511
+ 'box-right'?: (props: typeof __VLS_247) => any;
2496
2512
  } & {
2497
- 'form-start'?: (props: typeof __VLS_251) => any;
2513
+ 'form-start'?: (props: typeof __VLS_259) => any;
2498
2514
  } & {
2499
- 'form-end'?: (props: typeof __VLS_260) => any;
2515
+ 'form-end'?: (props: typeof __VLS_268) => any;
2500
2516
  }>;
2501
2517
  declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2502
2518
  /**
@@ -2583,7 +2599,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
2583
2599
  table?: {
2584
2600
  rowKey?: string | undefined;
2585
2601
  border?: boolean | undefined;
2586
- selectable?: boolean | ((data: any) => boolean) | undefined;
2602
+ selectable?: boolean | ((data: any) => boolean) | {
2603
+ [x: string]: any;
2604
+ show?: boolean | ((data: any) => boolean) | undefined;
2605
+ on?: any;
2606
+ } | undefined;
2587
2607
  column?: {
2588
2608
  key: string;
2589
2609
  label: string;
@@ -2981,12 +3001,20 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
2981
3001
  delete?: boolean | ((data: any) => boolean) | undefined;
2982
3002
  export?: {
2983
3003
  show?: boolean | undefined;
3004
+ dropdown?: {
3005
+ show?: boolean | undefined;
3006
+ select?: boolean | undefined;
3007
+ page?: boolean | undefined;
3008
+ all?: boolean | undefined;
3009
+ } | undefined;
2984
3010
  fileName?: string | (() => string) | undefined;
2985
3011
  before?: ((param: {
2986
3012
  data: any[];
2987
3013
  columns: import("./indexType").CurdConfigColumn<any>[];
2988
3014
  }) => void) | undefined;
3015
+ select?: ((param: any) => any) | undefined;
2989
3016
  all?: ((param: any) => any) | undefined;
3017
+ page?: ((param: any) => any) | undefined;
2990
3018
  } | undefined;
2991
3019
  } | undefined;
2992
3020
  form?: {
@@ -3769,6 +3797,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
3769
3797
  size: number;
3770
3798
  sizeList: number[];
3771
3799
  pagerCount: number;
3800
+ getQuery: (param?: {
3801
+ size?: number;
3802
+ num?: number;
3803
+ }) => any;
3772
3804
  };
3773
3805
  table: {
3774
3806
  op: {
@@ -4176,8 +4208,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
4176
4208
  export: {
4177
4209
  run: {
4178
4210
  start: (command: any) => Promise<void>;
4179
- select: () => any[];
4180
- page: () => any[];
4211
+ select: () => Promise<any[] | undefined>;
4212
+ page: () => Promise<any[] | undefined>;
4181
4213
  all: () => Promise<any>;
4182
4214
  };
4183
4215
  loading: boolean;
@@ -159,7 +159,13 @@ export interface CurdConfig<T = any> {
159
159
  * 是否可多选 - 通过conf.table.selection.list获取已选数据
160
160
  * 默认不显示
161
161
  */
162
- selectable: ((data: T) => boolean) | boolean;
162
+ selectable: Partial<{
163
+ [key: string]: any;
164
+ /** 是否显示选择 */
165
+ show: ((data: T) => boolean) | boolean;
166
+ /** 选择事件 */
167
+ on: any;
168
+ }> | ((data: T) => boolean) | boolean;
163
169
  /**
164
170
  * 额外的表格列信息,可配置是否可搜索,不参与新增编辑表单
165
171
  */
@@ -242,6 +248,17 @@ export interface CurdConfig<T = any> {
242
248
  * 是否显示导出 默认显示
243
249
  */
244
250
  show: boolean;
251
+ /** 下拉菜单配置 */
252
+ dropdown: Partial<{
253
+ /** 是否显示导出下拉菜单 默认显示 如果不显示,点击后导出全部数据 */
254
+ show: boolean;
255
+ /** 是否显示导出选中按钮 默认显示 */
256
+ select: boolean;
257
+ /** 是否显示导出当前页按钮 默认显示 */
258
+ page: boolean;
259
+ /** 是否显示导出全部按钮 默认显示 */
260
+ all: boolean;
261
+ }>;
245
262
  /**
246
263
  * 导出文件名前缀
247
264
  */
@@ -253,10 +270,18 @@ export interface CurdConfig<T = any> {
253
270
  data: T[];
254
271
  columns: CurdConfigColumn<T>[];
255
272
  }) => void;
273
+ /**
274
+ * 导出选中数据钩子
275
+ */
276
+ select: (param: T & Record<string, any>) => any;
256
277
  /**
257
278
  * 导出所有数据钩子
258
279
  */
259
280
  all: (param: T & Record<string, any>) => any;
281
+ /**
282
+ * 导出当前页数据钩子
283
+ */
284
+ page: (param: T & Record<string, any>) => any;
260
285
  }>;
261
286
  }>;
262
287
  /**
@@ -105,6 +105,17 @@ export default class TFormConfig {
105
105
  * 是否显示导出
106
106
  */
107
107
  show: boolean;
108
+ /** 下拉菜单配置 */
109
+ dropdown: {
110
+ /** 是否显示导出下拉菜单 默认显示 如果不显示,点击后导出全部数据 */
111
+ show: boolean;
112
+ /** 是否显示导出选中按钮 默认显示 */
113
+ select: boolean;
114
+ /** 是否显示导出当前页按钮 默认显示 */
115
+ page: boolean;
116
+ /** 是否显示导出全部按钮 默认显示 */
117
+ all: boolean;
118
+ };
108
119
  /**
109
120
  * 导出文件名前缀
110
121
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-form",
3
- "version": "1.1.42",
3
+ "version": "1.2.0",
4
4
  "description": "我来助你-表单组件库",
5
5
  "repository": {
6
6
  "type": "git",