cc1-form 1.1.36 → 1.1.38
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 +817 -826
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/column.vue.d.ts +665 -15
- package/dist/components/TCurd/com/form/list.vue.d.ts +2 -2
- package/dist/components/TCurd/formColumn.vue.d.ts +665 -15
- package/dist/components/TCurd/index.d.ts +671 -27
- package/dist/components/TCurd/index.vue.d.ts +1758 -350
- package/dist/components/TCurd/indexType.d.ts +8 -4
- package/dist/components/TCurd/tableColumn.vue.d.ts +4 -2
- package/dist/utils/TForm.d.ts +1 -0
- package/dist/utils/TFormConfig.d.ts +1 -0
- package/dist/utils/TSys.d.ts +1 -1
- package/package.json +1 -1
|
@@ -430,6 +430,10 @@ export interface CurdConfigColumn<T = any> {
|
|
|
430
430
|
options?: {
|
|
431
431
|
/** 搜索栏配置 - 如果不配置,使用默认配置 */
|
|
432
432
|
search?: CurdOptions<T>;
|
|
433
|
+
/** 新增编辑表单配置 - 如果不配置,使用默认配置 */
|
|
434
|
+
formAdd?: CurdOptions<T>;
|
|
435
|
+
/** 编辑表单配置 - 如果不配置,使用默认配置 */
|
|
436
|
+
formUpdate?: CurdOptions<T>;
|
|
433
437
|
} & Partial<CurdOptions<T>>;
|
|
434
438
|
/**
|
|
435
439
|
* 新增编辑表单配置
|
|
@@ -450,9 +454,9 @@ export interface CurdConfigColumn<T = any> {
|
|
|
450
454
|
/** 是否补充其他列空间 默认为false */
|
|
451
455
|
spanCol: boolean;
|
|
452
456
|
/**
|
|
453
|
-
* 提示文本
|
|
457
|
+
* 提示文本 - 返回字符串或者富文本内容
|
|
454
458
|
*/
|
|
455
|
-
tipText: string;
|
|
459
|
+
tipText: string | ((row: T, type: keyof typeof TSys.EDialog) => string);
|
|
456
460
|
}>;
|
|
457
461
|
/**
|
|
458
462
|
* 字段控件类型,决定在搜索、表格、表单中使用哪种 UI 组件渲染
|
|
@@ -490,7 +494,7 @@ export interface CurdConfigColumn<T = any> {
|
|
|
490
494
|
* options: { 'my-upload': { accept: 'image/*', limit: 1 } } }
|
|
491
495
|
* ```
|
|
492
496
|
*/
|
|
493
|
-
type?: 'input' | 'select' | 'switch' | 'radio' | 'checkbox' | 'date' | 'time' | 'datetime' | 'number' | 'color' | 'icon' | 'slider' | 'upload' | 'editor' | 'tree' | '
|
|
497
|
+
type?: 'input' | 'select' | 'switch' | 'radio' | 'checkbox' | 'date' | 'time' | 'datetime' | 'number' | 'color' | 'icon' | 'slider' | 'upload' | 'editor' | 'tree' | 'treeSelect' | 'list';
|
|
494
498
|
/**
|
|
495
499
|
* 表格配置
|
|
496
500
|
*/
|
|
@@ -584,7 +588,7 @@ export interface CurdConfigColumn<T = any> {
|
|
|
584
588
|
/**
|
|
585
589
|
* 表单显示(新增、编辑、查看)
|
|
586
590
|
*/
|
|
587
|
-
form?: ((data: T, type:
|
|
591
|
+
form?: ((data: T, type: keyof typeof TSys.EDialog) => boolean) | boolean;
|
|
588
592
|
};
|
|
589
593
|
/**
|
|
590
594
|
* 排序
|
|
@@ -3,6 +3,7 @@ import type { CurdConfig, CurdConfigColumn } from './indexType';
|
|
|
3
3
|
import questionFilled from './icon/questionFilled.vue';
|
|
4
4
|
import { ElInput, ElOption, ElSelect, ElSwitch, ElTableColumn } from 'element-plus';
|
|
5
5
|
import TSys from '../../utils/TSys';
|
|
6
|
+
import TForm from '../../utils/TForm';
|
|
6
7
|
declare const isFun: (fun: any, ...args: any[]) => any;
|
|
7
8
|
type __VLS_Props = {
|
|
8
9
|
conf: ReturnType<typeof curdConf>['conf'];
|
|
@@ -13,7 +14,7 @@ declare const self: any;
|
|
|
13
14
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
14
15
|
declare var __VLS_6: string, __VLS_7: {
|
|
15
16
|
item: CurdConfigColumn<any>;
|
|
16
|
-
}, __VLS_21: string | number, __VLS_22: any,
|
|
17
|
+
}, __VLS_21: string | number, __VLS_22: any, __VLS_37: string, __VLS_38: {
|
|
17
18
|
row: any;
|
|
18
19
|
item: CurdConfigColumn<any>;
|
|
19
20
|
};
|
|
@@ -22,7 +23,7 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
|
|
|
22
23
|
} & {
|
|
23
24
|
[K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
|
|
24
25
|
} & {
|
|
25
|
-
[K in NonNullable<typeof
|
|
26
|
+
[K in NonNullable<typeof __VLS_37>]?: (props: typeof __VLS_38) => any;
|
|
26
27
|
}>;
|
|
27
28
|
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
28
29
|
questionFilled: typeof questionFilled;
|
|
@@ -32,6 +33,7 @@ declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
|
32
33
|
ElSwitch: typeof ElSwitch;
|
|
33
34
|
ElTableColumn: typeof ElTableColumn;
|
|
34
35
|
TSys: typeof TSys;
|
|
36
|
+
TForm: typeof TForm;
|
|
35
37
|
isFun: typeof isFun;
|
|
36
38
|
self: typeof self;
|
|
37
39
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
package/dist/utils/TForm.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export default class TForm {
|
|
|
17
17
|
* 通常由插件安装时自动设置,也可手动注册:
|
|
18
18
|
* ```ts
|
|
19
19
|
* TForm.customComponent['my-editor'] = MyEditorComponent
|
|
20
|
+
* TForm.customComponent['my-editor'] = { form: MyEditorComponent, table: MyEditorComponent }
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
22
23
|
static customComponent: {
|
package/dist/utils/TSys.d.ts
CHANGED