cc1-form 1.1.37 → 1.1.39
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/cc1-form.js +1157 -1085
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/column.vue.d.ts +1485 -183
- package/dist/components/TCurd/com/form/list.vue.d.ts +2 -2
- package/dist/components/TCurd/formColumn.vue.d.ts +690 -40
- package/dist/components/TCurd/index.d.ts +709 -77
- package/dist/components/TCurd/index.vue.d.ts +1643 -259
- package/dist/components/TCurd/indexType.d.ts +16 -39
- package/dist/components/TCurd/tableColumn.vue.d.ts +2 -2
- package/dist/utils/TSys.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import TSys from '../../utils/TSys';
|
|
2
|
+
import type { curdConfType } from './index';
|
|
2
3
|
/**
|
|
3
4
|
* TCurd 组件的完整配置接口,用于声明搜索、表格、分页、表单、工具栏、API 等全部行为
|
|
4
5
|
*
|
|
@@ -282,25 +283,11 @@ export interface CurdConfig<T = any> {
|
|
|
282
283
|
/**
|
|
283
284
|
* 打开弹窗前执行处理
|
|
284
285
|
*/
|
|
285
|
-
openBefore?: (data: T, update:
|
|
286
|
-
/** 标题 */
|
|
287
|
-
title: string;
|
|
288
|
-
/** 类型 */
|
|
289
|
-
type: any;
|
|
290
|
-
/** 表单数据 */
|
|
291
|
-
form: T;
|
|
292
|
-
}) => any;
|
|
286
|
+
openBefore?: (data: T, update: curdConfType['conf']['update']) => any;
|
|
293
287
|
/**
|
|
294
288
|
* 打开弹窗后执行处理
|
|
295
289
|
*/
|
|
296
|
-
openAfter?: (data: T, update:
|
|
297
|
-
/** 标题 */
|
|
298
|
-
title: string;
|
|
299
|
-
/** 类型 */
|
|
300
|
-
type: any;
|
|
301
|
-
/** 表单数据 */
|
|
302
|
-
form: T;
|
|
303
|
-
}) => any;
|
|
290
|
+
openAfter?: (data: T, update: curdConfType['conf']['update']) => any;
|
|
304
291
|
/**
|
|
305
292
|
* 关闭弹窗前执行处理
|
|
306
293
|
*/
|
|
@@ -308,25 +295,11 @@ export interface CurdConfig<T = any> {
|
|
|
308
295
|
/**
|
|
309
296
|
* 提交前执行处理
|
|
310
297
|
*/
|
|
311
|
-
submitBefore?: (form: T, update:
|
|
312
|
-
/** 标题 */
|
|
313
|
-
title: string;
|
|
314
|
-
/** 类型 */
|
|
315
|
-
type: any;
|
|
316
|
-
/** 表单数据 */
|
|
317
|
-
form: T;
|
|
318
|
-
}) => any;
|
|
298
|
+
submitBefore?: (form: T, update: curdConfType['conf']['update']) => any;
|
|
319
299
|
/**
|
|
320
300
|
* 提交后执行处理
|
|
321
301
|
*/
|
|
322
|
-
submitAfter?: (form: T, update:
|
|
323
|
-
/** 标题 */
|
|
324
|
-
title: string;
|
|
325
|
-
/** 类型 */
|
|
326
|
-
type: any;
|
|
327
|
-
/** 表单数据 */
|
|
328
|
-
form: T;
|
|
329
|
-
}) => any;
|
|
302
|
+
submitAfter?: (form: T, update: curdConfType['conf']['update']) => any;
|
|
330
303
|
}>;
|
|
331
304
|
/**
|
|
332
305
|
* 表格列和新增编辑表单字段
|
|
@@ -430,6 +403,10 @@ export interface CurdConfigColumn<T = any> {
|
|
|
430
403
|
options?: {
|
|
431
404
|
/** 搜索栏配置 - 如果不配置,使用默认配置 */
|
|
432
405
|
search?: CurdOptions<T>;
|
|
406
|
+
/** 新增编辑表单配置 - 如果不配置,使用默认配置 */
|
|
407
|
+
formAdd?: CurdOptions<T>;
|
|
408
|
+
/** 编辑表单配置 - 如果不配置,使用默认配置 */
|
|
409
|
+
formUpdate?: CurdOptions<T>;
|
|
433
410
|
} & Partial<CurdOptions<T>>;
|
|
434
411
|
/**
|
|
435
412
|
* 新增编辑表单配置
|
|
@@ -450,9 +427,9 @@ export interface CurdConfigColumn<T = any> {
|
|
|
450
427
|
/** 是否补充其他列空间 默认为false */
|
|
451
428
|
spanCol: boolean;
|
|
452
429
|
/**
|
|
453
|
-
* 提示文本
|
|
430
|
+
* 提示文本 - 返回字符串或者富文本内容
|
|
454
431
|
*/
|
|
455
|
-
tipText: string;
|
|
432
|
+
tipText: string | ((row: T, type: keyof typeof TSys.EDialog) => string);
|
|
456
433
|
}>;
|
|
457
434
|
/**
|
|
458
435
|
* 字段控件类型,决定在搜索、表格、表单中使用哪种 UI 组件渲染
|
|
@@ -557,12 +534,12 @@ export interface CurdConfigColumn<T = any> {
|
|
|
557
534
|
/** 文本配置 */
|
|
558
535
|
text?: Partial<{
|
|
559
536
|
/** 搜索文本配置 */
|
|
560
|
-
search: {
|
|
537
|
+
search: Partial<{
|
|
561
538
|
/** 搜索文本标签 如果为空字符串则不显示标签 */
|
|
562
539
|
label: string;
|
|
563
540
|
/** 搜索文本占位符 */
|
|
564
541
|
placeholder: string;
|
|
565
|
-
}
|
|
542
|
+
}>;
|
|
566
543
|
/** 新增编辑表单文本配置 */
|
|
567
544
|
form: Partial<{
|
|
568
545
|
/** 新增编辑表单文本标签 如果为false则不显示标签 */
|
|
@@ -584,7 +561,7 @@ export interface CurdConfigColumn<T = any> {
|
|
|
584
561
|
/**
|
|
585
562
|
* 表单显示(新增、编辑、查看)
|
|
586
563
|
*/
|
|
587
|
-
form?: ((data: T, type:
|
|
564
|
+
form?: ((data: T, type: keyof typeof TSys.EDialog) => boolean) | boolean;
|
|
588
565
|
};
|
|
589
566
|
/**
|
|
590
567
|
* 排序
|
|
@@ -668,7 +645,7 @@ export type CurdOptions<T = any> = {
|
|
|
668
645
|
*/
|
|
669
646
|
data: CurdSelectData[];
|
|
670
647
|
/** 获取数据回调,如果传入,会在初始化、新增、编辑时调用,返回数据源后不再进行请求,如果返回false不进行更改之前的数据 */
|
|
671
|
-
dataApi: (param
|
|
648
|
+
dataApi: (param: T, type: 'init' | 'update') => CurdSelectData[] | Promise<CurdSelectData[]> | boolean;
|
|
672
649
|
/** 获取数据挂载配置 */
|
|
673
650
|
dataApiConfig: {
|
|
674
651
|
/** 是否只获取一次数据 - 默认为true */
|
|
@@ -761,7 +738,7 @@ export type CurdOptions<T = any> = {
|
|
|
761
738
|
*/
|
|
762
739
|
data: CurdSelectData[];
|
|
763
740
|
/** 获取数据回调,如果传入,会在初始化、新增、编辑时调用,返回数据源后不再进行请求,如果返回false不进行更改之前的数据 */
|
|
764
|
-
dataApi: (param
|
|
741
|
+
dataApi: (param: T, type: 'init' | 'update') => CurdSelectData[] | Promise<CurdSelectData[]> | boolean;
|
|
765
742
|
/** 获取数据挂载配置 */
|
|
766
743
|
dataApiConfig: {
|
|
767
744
|
/** 是否只获取一次数据 - 默认为true */
|
|
@@ -14,7 +14,7 @@ declare const self: any;
|
|
|
14
14
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
15
15
|
declare var __VLS_6: string, __VLS_7: {
|
|
16
16
|
item: CurdConfigColumn<any>;
|
|
17
|
-
}, __VLS_21: string | number, __VLS_22: any,
|
|
17
|
+
}, __VLS_21: string | number, __VLS_22: any, __VLS_37: string, __VLS_38: {
|
|
18
18
|
row: any;
|
|
19
19
|
item: CurdConfigColumn<any>;
|
|
20
20
|
};
|
|
@@ -23,7 +23,7 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
|
|
|
23
23
|
} & {
|
|
24
24
|
[K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
|
|
25
25
|
} & {
|
|
26
|
-
[K in NonNullable<typeof
|
|
26
|
+
[K in NonNullable<typeof __VLS_37>]?: (props: typeof __VLS_38) => any;
|
|
27
27
|
}>;
|
|
28
28
|
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
29
29
|
questionFilled: typeof questionFilled;
|
package/dist/utils/TSys.d.ts
CHANGED