@ttkj/avue 2.10.21 → 2.10.23
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/avue.js +31 -31
- package/lib/avue.min.js +2 -2
- package/package.json +1 -1
- package/types/crud/refs/dialog-form.d.ts +1 -0
- package/types/crud/refs/header-search.d.ts +8 -0
- package/types/form/index.d.ts +33 -2
- package/types/form/option.d.ts +1 -1
package/package.json
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
// 引入定义
|
2
2
|
import { FormOption } from '../../form/option';
|
3
|
+
import { AvueForm } from '../../form/index';
|
4
|
+
|
5
|
+
/** 表单Refs */
|
6
|
+
export interface AvueCrudHeaderRefs {
|
7
|
+
form: AvueForm;
|
8
|
+
}
|
3
9
|
|
4
10
|
export declare class AvueCrudHeaderSearch {
|
5
11
|
/** 搜索表单配置 */
|
@@ -15,4 +21,6 @@ export declare class AvueCrudHeaderSearch {
|
|
15
21
|
handleSearchCollapse(searchShow: boolean): void;
|
16
22
|
/** 判断是否显示搜索 */
|
17
23
|
dataFormat(): void;
|
24
|
+
/** 组件Refs */
|
25
|
+
$refs: AvueCrudHeaderRefs;
|
18
26
|
}
|
package/types/form/index.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
// 引入定义
|
2
2
|
import { VNode } from 'vue';
|
3
3
|
import { ElForm } from 'element-ui/types/form';
|
4
|
-
import { AvueComponent } from '../global';
|
4
|
+
import { AvueComponent, DicHttpProps, Obj } from '../global';
|
5
5
|
import { FormOption } from './option';
|
6
|
+
import { DicProps } from './column';
|
6
7
|
|
7
8
|
/** 表单Refs */
|
8
9
|
export interface AvueFormRefs {
|
@@ -67,15 +68,45 @@ export declare class AvueForm<T = Obj> extends AvueComponent {
|
|
67
68
|
}
|
68
69
|
|
69
70
|
/** 通用表单插槽 */
|
70
|
-
export interface FormNormalScope<T = any, D = Obj> {
|
71
|
+
export interface FormNormalScope<T = any, D = Obj, U = Obj, R = Obj> {
|
71
72
|
/** 表单值 */
|
72
73
|
value: T;
|
74
|
+
/** 选中值,仅适用于涉及字典的组件 */
|
75
|
+
label?: string;
|
73
76
|
/** 列配置 */
|
74
77
|
column: AvueCrudColumn;
|
75
78
|
/** 大小 */
|
76
79
|
size: AvueComponentSize;
|
80
|
+
/** 是否只读 */
|
81
|
+
readonly?: boolean;
|
77
82
|
/** 是否禁用 */
|
78
83
|
disabled: boolean;
|
79
84
|
/** 表单数据 */
|
80
85
|
row: D;
|
86
|
+
/** 字典 */
|
87
|
+
dic?: U[];
|
88
|
+
/** 输入时是否触发表单的校验, 仅针对input类型 */
|
89
|
+
validateEvent: boolean;
|
90
|
+
/** 参数配置项 */
|
91
|
+
props?: Partial<DicProps>;
|
92
|
+
/** 默认的接口请求配置 */
|
93
|
+
propsHttp?: DicHttpProps;
|
94
|
+
/** 外部传入的数据 */
|
95
|
+
tableData: {
|
96
|
+
/** 表单数据 */
|
97
|
+
row: D;
|
98
|
+
/** 列配置索引 */
|
99
|
+
columnIndex: Record<string, AvueCrudColumn>;
|
100
|
+
/** 行索引, dynamic组件下子组件生效 */
|
101
|
+
index?: number;
|
102
|
+
/** 上级组件相关数据, dynamic组件下子组件生效 */
|
103
|
+
rootFormData?: {
|
104
|
+
/** 列配置索引 */
|
105
|
+
columnIndex: Record<string, AvueCrudColumn>;
|
106
|
+
/** 表单配置 */
|
107
|
+
formOption: FormOption;
|
108
|
+
/** 表单数据 */
|
109
|
+
data: R;
|
110
|
+
};
|
111
|
+
};
|
81
112
|
}
|
package/types/form/option.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ResponsiveColumn } from 'element-ui/types/col';
|
2
|
-
import { AvueAlignment, AvueComponentSize, DicHttpProps } from '../global';
|
2
|
+
import { AvueAlignment, AvueComponentSize, DicHttpProps, Obj } from '../global';
|
3
3
|
import { AvueFormColumn } from './column';
|
4
4
|
|
5
5
|
/** 表单组件基本配置属性 */
|