@vrojs/element-plus 0.0.21 → 0.0.23
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/index.d.ts +1 -0
- package/dist/index.js +142 -134
- package/dist/locale/index.d.ts +1 -0
- package/dist/locale/index.js +5 -3
- package/dist/locale/lang/en.d.ts +3 -0
- package/dist/locale/lang/en.js +3 -0
- package/dist/locale/lang/zh-cn.d.ts +3 -0
- package/dist/locale/lang/zh-cn.js +3 -0
- package/dist/locale/lang/zh-tw.d.ts +57 -0
- package/dist/locale/lang/zh-tw.js +59 -0
- package/dist/style/deps.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/vro-el-schema-descs/function-call.d.ts +15 -0
- package/dist/vro-el-schema-descs/function-call.js +35 -0
- package/dist/vro-el-schema-descs/index.d.ts +105 -0
- package/dist/vro-el-schema-descs/index.js +11 -0
- package/dist/vro-el-schema-descs/style/css.d.ts +0 -0
- package/dist/vro-el-schema-descs/style/css.js +4 -0
- package/dist/vro-el-schema-descs/style/deps.d.ts +0 -0
- package/dist/vro-el-schema-descs/style/deps.js +4 -0
- package/dist/vro-el-schema-descs/style/index.css +1 -0
- package/dist/vro-el-schema-descs/style/index.d.ts +0 -0
- package/dist/vro-el-schema-descs/style/index.js +2 -0
- package/dist/vro-el-schema-descs/types.d.ts +122 -0
- package/dist/vro-el-schema-descs/types.js +33 -0
- package/dist/vro-el-schema-descs/vro-el-schema-descs.vue.d.ts +70 -0
- package/dist/vro-el-schema-descs/vro-el-schema-descs.vue.js +86 -0
- package/dist/vro-el-schema-descs/vro-el-schema-descs.vue2.js +4 -0
- package/dist/vro-el-schema-filter/index.d.ts +15 -15
- package/dist/vro-el-schema-filter/vro-el-schema-filter.vue.d.ts +20 -20
- package/dist/vro-el-schema-form/index.d.ts +7 -7
- package/dist/vro-el-schema-form/useVroElSchemaForm.d.ts +18 -18
- package/dist/vro-el-schema-form/vro-el-schema-form.vue.d.ts +4 -4
- package/dist/vro-el-schema-form-dialog/index.d.ts +39 -39
- package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.d.ts +28 -28
- package/dist/vro-el-schema-form-drawer/index.d.ts +39 -39
- package/dist/vro-el-schema-form-drawer/vro-el-schema-form-drawer.vue.d.ts +28 -28
- package/dist/vro-el-table-actions-column/index.d.ts +3 -3
- package/dist/vro-el-table-actions-column/types.d.ts +1 -1
- package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue.d.ts +1 -1
- package/dist/vro-el-table-column/index.d.ts +3 -3
- package/dist/vro-el-table-column/vro-el-table-column.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export * from './function-call';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export declare const VroElSchemaDescs: import('@vrojs/base').WithInstall<{
|
|
4
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: null;
|
|
7
|
+
default: undefined;
|
|
8
|
+
};
|
|
9
|
+
data: {
|
|
10
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
schema: {
|
|
14
|
+
type: import('vue').PropType<import('./types').VroElSchemaDescsSchema | ((data: any) => import('./types').VroElSchemaDescsSchema)>;
|
|
15
|
+
default: () => never[];
|
|
16
|
+
};
|
|
17
|
+
descProps: {
|
|
18
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionProps>>;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
itemProps: {
|
|
22
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionItemProps>>;
|
|
23
|
+
default: () => {};
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
26
|
+
data: Record<string, any>;
|
|
27
|
+
modelValue: any;
|
|
28
|
+
schema: import('./types').VroElSchemaDescsSchema<any> | ((data: any) => import('./types').VroElSchemaDescsSchema);
|
|
29
|
+
descProps: Partial<import('element-plus').DescriptionProps>;
|
|
30
|
+
itemProps: Partial<import('element-plus').DescriptionItemProps>;
|
|
31
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
32
|
+
P: {};
|
|
33
|
+
B: {};
|
|
34
|
+
D: {};
|
|
35
|
+
C: {};
|
|
36
|
+
M: {};
|
|
37
|
+
Defaults: {};
|
|
38
|
+
}, Readonly<import('vue').ExtractPropTypes<{
|
|
39
|
+
modelValue: {
|
|
40
|
+
type: null;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
43
|
+
data: {
|
|
44
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
45
|
+
default: () => {};
|
|
46
|
+
};
|
|
47
|
+
schema: {
|
|
48
|
+
type: import('vue').PropType<import('./types').VroElSchemaDescsSchema | ((data: any) => import('./types').VroElSchemaDescsSchema)>;
|
|
49
|
+
default: () => never[];
|
|
50
|
+
};
|
|
51
|
+
descProps: {
|
|
52
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionProps>>;
|
|
53
|
+
default: () => {};
|
|
54
|
+
};
|
|
55
|
+
itemProps: {
|
|
56
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionItemProps>>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, {
|
|
60
|
+
data: Record<string, any>;
|
|
61
|
+
modelValue: any;
|
|
62
|
+
schema: import('./types').VroElSchemaDescsSchema<any> | ((data: any) => import('./types').VroElSchemaDescsSchema);
|
|
63
|
+
descProps: Partial<import('element-plus').DescriptionProps>;
|
|
64
|
+
itemProps: Partial<import('element-plus').DescriptionItemProps>;
|
|
65
|
+
}>;
|
|
66
|
+
__isFragment?: never;
|
|
67
|
+
__isTeleport?: never;
|
|
68
|
+
__isSuspense?: never;
|
|
69
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
70
|
+
modelValue: {
|
|
71
|
+
type: null;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
data: {
|
|
75
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
76
|
+
default: () => {};
|
|
77
|
+
};
|
|
78
|
+
schema: {
|
|
79
|
+
type: import('vue').PropType<import('./types').VroElSchemaDescsSchema | ((data: any) => import('./types').VroElSchemaDescsSchema)>;
|
|
80
|
+
default: () => never[];
|
|
81
|
+
};
|
|
82
|
+
descProps: {
|
|
83
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionProps>>;
|
|
84
|
+
default: () => {};
|
|
85
|
+
};
|
|
86
|
+
itemProps: {
|
|
87
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionItemProps>>;
|
|
88
|
+
default: () => {};
|
|
89
|
+
};
|
|
90
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
91
|
+
data: Record<string, any>;
|
|
92
|
+
modelValue: any;
|
|
93
|
+
schema: import('./types').VroElSchemaDescsSchema<any> | ((data: any) => import('./types').VroElSchemaDescsSchema);
|
|
94
|
+
descProps: Partial<import('element-plus').DescriptionProps>;
|
|
95
|
+
itemProps: Partial<import('element-plus').DescriptionItemProps>;
|
|
96
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
97
|
+
$slots: Readonly<import('./types').VroElSchemaDescsSlots<any>> & import('./types').VroElSchemaDescsSlots<any>;
|
|
98
|
+
})>;
|
|
99
|
+
export default VroElSchemaDescs;
|
|
100
|
+
export type VroElSchemaDescsInstance = InstanceType<typeof VroElSchemaDescs>;
|
|
101
|
+
declare module 'vue' {
|
|
102
|
+
interface GlobalComponents {
|
|
103
|
+
VroElSchemaDescs: typeof VroElSchemaDescs;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withInstall as o } from "@vrojs/base";
|
|
2
|
+
import r from "./vro-el-schema-descs.vue.js";
|
|
3
|
+
import { createVroElSchemaDescsDialog as c } from "./function-call.js";
|
|
4
|
+
import { vroElSchemaDescsProps as f } from "./types.js";
|
|
5
|
+
const m = o(r);
|
|
6
|
+
export {
|
|
7
|
+
m as VroElSchemaDescs,
|
|
8
|
+
c as createVroElSchemaDescsDialog,
|
|
9
|
+
m as default,
|
|
10
|
+
f as vroElSchemaDescsProps
|
|
11
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,:host{--vro-el-schema-descs-label-color: var(--el-text-color-regular);--vro-el-schema-descs-content-color: var(--el-text-color-primary)}.vro-el-schema-descs{width:100%}.vro-el-schema-descs .el-descriptions__label{color:var(--vro-el-schema-descs-label-color)}.vro-el-schema-descs .el-descriptions__content{color:var(--vro-el-schema-descs-content-color);white-space:pre-wrap;word-break:break-word}
|
|
File without changes
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { DescriptionItemProps, DescriptionProps } from 'element-plus';
|
|
2
|
+
import { ExtractPropTypes, PropType, VNodeChild } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 描述项枚举映射,key 为数据源原始值。
|
|
5
|
+
*/
|
|
6
|
+
export type VroElSchemaDescsItemMap = Record<string | number, any>;
|
|
7
|
+
/**
|
|
8
|
+
* 描述项配置,对应一个 ElDescriptionsItem。
|
|
9
|
+
*/
|
|
10
|
+
export interface VroElSchemaDescsItemField<T = any> {
|
|
11
|
+
/**
|
|
12
|
+
* 唯一标识,缺省时依次取 prop、索引,用于优化列表渲染。
|
|
13
|
+
*/
|
|
14
|
+
key?: string | number;
|
|
15
|
+
/**
|
|
16
|
+
* 标签文本。
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 数据源字段路径,支持 a.b.c、list[0].name 写法。
|
|
21
|
+
*/
|
|
22
|
+
prop?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 字段值,配置 prop 时作为取不到值的兜底。
|
|
25
|
+
*/
|
|
26
|
+
value?: any;
|
|
27
|
+
/**
|
|
28
|
+
* 空值兜底,默认 '-'。
|
|
29
|
+
*/
|
|
30
|
+
defaultValue?: any;
|
|
31
|
+
/**
|
|
32
|
+
* 单位,拼接在值后面,空值不拼接。
|
|
33
|
+
*/
|
|
34
|
+
unit?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 值预处理,入参为数据源原始值和完整数据源。
|
|
37
|
+
*/
|
|
38
|
+
get?: (value: any, data: T) => any;
|
|
39
|
+
/**
|
|
40
|
+
* 枚举映射,展示前把原始值替换成映射值。
|
|
41
|
+
*/
|
|
42
|
+
map?: VroElSchemaDescsItemMap;
|
|
43
|
+
/**
|
|
44
|
+
* 枚举映射取值字段,false 表示直接使用映射结果,默认 'label'。
|
|
45
|
+
*/
|
|
46
|
+
mapValueKey?: string | false;
|
|
47
|
+
/**
|
|
48
|
+
* 值格式化,在 get、map 之后执行。
|
|
49
|
+
*/
|
|
50
|
+
formatter?: (value: any, data: T) => any;
|
|
51
|
+
/**
|
|
52
|
+
* 自定义渲染,入参为展示值和完整数据源,返回 vnode,优先级高于默认文本。
|
|
53
|
+
*/
|
|
54
|
+
render?: (value: any, data: T) => VNodeChild;
|
|
55
|
+
/**
|
|
56
|
+
* 当前描述项的 ElDescriptionsItem 属性,优先级高于组件级 itemProps。
|
|
57
|
+
*/
|
|
58
|
+
itemProps?: Partial<DescriptionItemProps>;
|
|
59
|
+
/**
|
|
60
|
+
* 是否隐藏,入参为处理后的原始值和完整数据源。
|
|
61
|
+
*/
|
|
62
|
+
hidden?: boolean | ((value: any, data: T) => boolean);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 描述 schema 的每一项,支持描述项、嵌套分组、按数据源生成的分组。
|
|
66
|
+
*/
|
|
67
|
+
export type VroElSchemaDescsSchemaItem<T = any> = VroElSchemaDescsItemField<T> | VroElSchemaDescsSchema<T> | ((data: T) => VroElSchemaDescsSchema<T>);
|
|
68
|
+
/**
|
|
69
|
+
* 描述 schema,支持嵌套分组、按数据源生成的写法。
|
|
70
|
+
*/
|
|
71
|
+
export type VroElSchemaDescsSchema<T = any> = VroElSchemaDescsSchemaItem<T>[];
|
|
72
|
+
export declare const vroElSchemaDescsProps: {
|
|
73
|
+
/**
|
|
74
|
+
* 数据源。
|
|
75
|
+
*/
|
|
76
|
+
data: {
|
|
77
|
+
type: PropType<Record<string, any>>;
|
|
78
|
+
default: () => {};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* 描述项 schema。
|
|
82
|
+
*/
|
|
83
|
+
schema: {
|
|
84
|
+
type: PropType<VroElSchemaDescsSchema | ((data: any) => VroElSchemaDescsSchema)>;
|
|
85
|
+
default: () => never[];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 透传给 ElDescriptions 的属性,默认带边框。
|
|
89
|
+
*/
|
|
90
|
+
descProps: {
|
|
91
|
+
type: PropType<Partial<DescriptionProps>>;
|
|
92
|
+
default: () => {};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 透传给 ElDescriptionsItem 的默认属性,字段级 itemProps 优先级更高。
|
|
96
|
+
*/
|
|
97
|
+
itemProps: {
|
|
98
|
+
type: PropType<Partial<DescriptionItemProps>>;
|
|
99
|
+
default: () => {};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type VroElSchemaDescsProps = ExtractPropTypes<typeof vroElSchemaDescsProps>;
|
|
103
|
+
export interface VroElSchemaDescsSlotProps<T = any> {
|
|
104
|
+
/**
|
|
105
|
+
* 当前描述项,value 为处理后的展示值。
|
|
106
|
+
*/
|
|
107
|
+
item: VroElSchemaDescsItemField<T>;
|
|
108
|
+
/**
|
|
109
|
+
* 数据源。
|
|
110
|
+
*/
|
|
111
|
+
data: T;
|
|
112
|
+
/**
|
|
113
|
+
* 当前描述项索引。
|
|
114
|
+
*/
|
|
115
|
+
index: number;
|
|
116
|
+
}
|
|
117
|
+
export interface VroElSchemaDescsSlots<T = any> {
|
|
118
|
+
/**
|
|
119
|
+
* 自定义描述项内容,优先级高于 is 和默认文本。
|
|
120
|
+
*/
|
|
121
|
+
item?: (props: VroElSchemaDescsSlotProps<T>) => any;
|
|
122
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
/**
|
|
3
|
+
* 数据源。
|
|
4
|
+
*/
|
|
5
|
+
data: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: () => ({})
|
|
8
|
+
},
|
|
9
|
+
/**
|
|
10
|
+
* 描述项 schema。
|
|
11
|
+
*/
|
|
12
|
+
schema: {
|
|
13
|
+
type: [Array, Function],
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* 透传给 ElDescriptions 的属性,默认带边框。
|
|
18
|
+
*/
|
|
19
|
+
descProps: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({})
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 透传给 ElDescriptionsItem 的默认属性,字段级 itemProps 优先级更高。
|
|
25
|
+
*/
|
|
26
|
+
itemProps: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({})
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
e as vroElSchemaDescsProps
|
|
33
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VroElSchemaDescsSchema, VroElSchemaDescsSlots } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<VroElSchemaDescsSlots<any>> & VroElSchemaDescsSlots<any>;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
10
|
+
/**
|
|
11
|
+
* 仅用于承接 VroElSchemaForm 的 v-model 绑定,避免透传到根节点。
|
|
12
|
+
*/
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: null;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
data: {
|
|
18
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
schema: {
|
|
22
|
+
type: import('vue').PropType<VroElSchemaDescsSchema | ((data: any) => VroElSchemaDescsSchema)>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
descProps: {
|
|
26
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionProps>>;
|
|
27
|
+
default: () => {};
|
|
28
|
+
};
|
|
29
|
+
itemProps: {
|
|
30
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionItemProps>>;
|
|
31
|
+
default: () => {};
|
|
32
|
+
};
|
|
33
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
34
|
+
/**
|
|
35
|
+
* 仅用于承接 VroElSchemaForm 的 v-model 绑定,避免透传到根节点。
|
|
36
|
+
*/
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: null;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
data: {
|
|
42
|
+
type: import('vue').PropType<Record<string, any>>;
|
|
43
|
+
default: () => {};
|
|
44
|
+
};
|
|
45
|
+
schema: {
|
|
46
|
+
type: import('vue').PropType<VroElSchemaDescsSchema | ((data: any) => VroElSchemaDescsSchema)>;
|
|
47
|
+
default: () => never[];
|
|
48
|
+
};
|
|
49
|
+
descProps: {
|
|
50
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionProps>>;
|
|
51
|
+
default: () => {};
|
|
52
|
+
};
|
|
53
|
+
itemProps: {
|
|
54
|
+
type: import('vue').PropType<Partial<import('element-plus').DescriptionItemProps>>;
|
|
55
|
+
default: () => {};
|
|
56
|
+
};
|
|
57
|
+
}>> & Readonly<{}>, {
|
|
58
|
+
data: Record<string, any>;
|
|
59
|
+
modelValue: any;
|
|
60
|
+
schema: VroElSchemaDescsSchema<any> | ((data: any) => VroElSchemaDescsSchema);
|
|
61
|
+
descProps: Partial<import('element-plus').DescriptionProps>;
|
|
62
|
+
itemProps: Partial<import('element-plus').DescriptionItemProps>;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
65
|
+
export default _default;
|
|
66
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
67
|
+
new (): {
|
|
68
|
+
$slots: S;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { defineComponent as m, computed as E, createBlock as p, openBlock as s, unref as u, mergeProps as l, withCtx as d, createElementBlock as h, Fragment as y, renderList as P, renderSlot as k, resolveDynamicComponent as S, createTextVNode as f, toDisplayString as B } from "vue";
|
|
2
|
+
import { isFunction as c, isArray as C, getByPath as _, isUndefined as $, isObject as F, isEmpty as i } from "@daysnap/utils";
|
|
3
|
+
import { ElDescriptions as K, ElDescriptionsItem as N } from "element-plus";
|
|
4
|
+
import { vroElSchemaDescsProps as j } from "./types.js";
|
|
5
|
+
const O = /* @__PURE__ */ m({
|
|
6
|
+
name: "VroElSchemaDescs",
|
|
7
|
+
__name: "vro-el-schema-descs",
|
|
8
|
+
props: {
|
|
9
|
+
...j,
|
|
10
|
+
/**
|
|
11
|
+
* 仅用于承接 VroElSchemaForm 的 v-model 绑定,避免透传到根节点。
|
|
12
|
+
*/
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: null,
|
|
15
|
+
default: void 0
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(V) {
|
|
19
|
+
const a = V, v = m({
|
|
20
|
+
name: "VroElSchemaDescsVNode",
|
|
21
|
+
props: {
|
|
22
|
+
vnode: {
|
|
23
|
+
type: null,
|
|
24
|
+
required: !0
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(e) {
|
|
28
|
+
return () => e.vnode;
|
|
29
|
+
}
|
|
30
|
+
}), b = (e, t) => {
|
|
31
|
+
const o = e.prop ? _(t, e.prop, e.value) : e.value;
|
|
32
|
+
return c(e.get) ? e.get(o, t) : o;
|
|
33
|
+
}, g = (e, t, o) => {
|
|
34
|
+
if (e.map) {
|
|
35
|
+
const r = e.map[t], n = e.mapValueKey ?? "label";
|
|
36
|
+
$(r) || (t = n && F(r) ? r[n] : r);
|
|
37
|
+
}
|
|
38
|
+
return c(e.formatter) && (t = e.formatter(t, o)), e.unit && !i(t) && (t = `${t}${e.unit}`), i(t) ? e.defaultValue ?? "-" : t;
|
|
39
|
+
}, D = E(() => {
|
|
40
|
+
const e = [], t = (o) => {
|
|
41
|
+
o.forEach((r) => {
|
|
42
|
+
if (C(r)) {
|
|
43
|
+
t(r);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (c(r)) {
|
|
47
|
+
t(r(a.data));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const n = b(r, a.data);
|
|
51
|
+
(c(r.hidden) ? r.hidden(n, a.data) : r.hidden) || e.push({ ...r, value: g(r, n, a.data) });
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return t(c(a.schema) ? a.schema(a.data) : a.schema), e;
|
|
55
|
+
});
|
|
56
|
+
return (e, t) => (s(), p(u(K), l({ class: "vro-el-schema-descs" }, { border: !0, ...e.descProps }), {
|
|
57
|
+
default: d(() => [
|
|
58
|
+
(s(!0), h(y, null, P(D.value, (o, r) => (s(), p(u(N), l({
|
|
59
|
+
key: o.key ?? o.prop ?? r
|
|
60
|
+
}, { ref_for: !0 }, { ...e.itemProps, ...o.itemProps }, {
|
|
61
|
+
label: o.label ?? o.itemProps?.label ?? e.itemProps.label
|
|
62
|
+
}), {
|
|
63
|
+
default: d(() => [
|
|
64
|
+
k(e.$slots, "item", {
|
|
65
|
+
item: o,
|
|
66
|
+
data: e.data,
|
|
67
|
+
index: r
|
|
68
|
+
}, () => [
|
|
69
|
+
o.render ? (s(), p(S(u(v)), {
|
|
70
|
+
key: 0,
|
|
71
|
+
vnode: o.render(o.value, e.data)
|
|
72
|
+
}, null, 8, ["vnode"])) : (s(), h(y, { key: 1 }, [
|
|
73
|
+
f(B(o.value), 1)
|
|
74
|
+
], 64))
|
|
75
|
+
])
|
|
76
|
+
]),
|
|
77
|
+
_: 2
|
|
78
|
+
}, 1040, ["label"]))), 128))
|
|
79
|
+
]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 16));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export {
|
|
85
|
+
O as default
|
|
86
|
+
};
|
|
@@ -36,31 +36,31 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
36
36
|
query: (value: import('./types').VroElSchemaFilterQueryValue) => any;
|
|
37
37
|
}, import('vue').PublicProps, {
|
|
38
38
|
loading: boolean;
|
|
39
|
+
labelWidth: string | number;
|
|
40
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
39
41
|
colProps: Partial<import('element-plus').ColProps>;
|
|
40
42
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
41
|
-
labelWidth: string | number;
|
|
42
43
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
43
44
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
44
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
45
45
|
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
46
46
|
schemaFormRef: ({
|
|
47
47
|
$: import('vue').ComponentInternalInstance;
|
|
48
48
|
$data: {};
|
|
49
49
|
$props: Partial<{
|
|
50
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
50
51
|
colProps: Partial<import('element-plus').ColProps>;
|
|
51
52
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
52
53
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
53
54
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
54
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
55
55
|
}> & Omit<{
|
|
56
|
+
readonly schema: import('..').VroElSchemaFormSchema;
|
|
56
57
|
readonly colProps: Partial<import('element-plus').ColProps>;
|
|
57
58
|
readonly formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
58
59
|
readonly formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
59
60
|
readonly rowProps: Partial<import('element-plus').RowProps>;
|
|
60
|
-
readonly schema: import('..').VroElSchemaFormSchema;
|
|
61
61
|
readonly "onChange-field"?: ((payload: import('..').VroElSchemaFormFieldEvent) => any) | undefined;
|
|
62
62
|
readonly "onInput-field"?: ((payload: import('..').VroElSchemaFormFieldEvent) => any) | undefined;
|
|
63
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "
|
|
63
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "schema" | "colProps" | "formItemProps" | "formProps" | "rowProps">;
|
|
64
64
|
$attrs: {
|
|
65
65
|
[x: string]: unknown;
|
|
66
66
|
};
|
|
@@ -154,7 +154,7 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
154
154
|
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
155
155
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
156
156
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
157
|
-
}>, "
|
|
157
|
+
}>, "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
158
158
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
159
159
|
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
160
160
|
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -290,7 +290,7 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
290
290
|
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
291
291
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
292
292
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
293
|
-
}>, "
|
|
293
|
+
}>, "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
294
294
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
295
295
|
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
296
296
|
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -317,11 +317,11 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
317
317
|
"change-field": (payload: import('..').VroElSchemaFormFieldEvent) => any;
|
|
318
318
|
"input-field": (payload: import('..').VroElSchemaFormFieldEvent) => any;
|
|
319
319
|
}, string, {
|
|
320
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
320
321
|
colProps: Partial<import('element-plus').ColProps>;
|
|
321
322
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
322
323
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
323
324
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
324
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
325
325
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
326
326
|
beforeCreate?: (() => void) | (() => void)[];
|
|
327
327
|
created?: (() => void) | (() => void)[];
|
|
@@ -343,11 +343,11 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
343
343
|
$nextTick: typeof import('vue').nextTick;
|
|
344
344
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
345
345
|
} & Readonly<{
|
|
346
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
346
347
|
colProps: Partial<import('element-plus').ColProps>;
|
|
347
348
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
348
349
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
349
350
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
350
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
351
351
|
}> & Omit<Readonly<import('vue').ExtractPropTypes<{
|
|
352
352
|
formProps: {
|
|
353
353
|
type: import('vue').PropType<import('..').VroElSchemaFormFormProps>;
|
|
@@ -372,7 +372,7 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
372
372
|
}>> & Readonly<{
|
|
373
373
|
"onChange-field"?: ((payload: import('..').VroElSchemaFormFieldEvent) => any) | undefined;
|
|
374
374
|
"onInput-field"?: ((payload: import('..').VroElSchemaFormFieldEvent) => any) | undefined;
|
|
375
|
-
}>, "trigger" | "validate" | "validateField" | "resetFields" | ("
|
|
375
|
+
}>, "trigger" | "validate" | "validateField" | "resetFields" | ("schema" | "colProps" | "formItemProps" | "formProps" | "rowProps") | "elForm" | "extractValues"> & import('vue').ShallowUnwrapRef<{
|
|
376
376
|
elForm: {
|
|
377
377
|
$: import('vue').ComponentInternalInstance;
|
|
378
378
|
$data: {};
|
|
@@ -460,7 +460,7 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
460
460
|
scrollIntoViewOptions: ScrollIntoViewOptions | boolean;
|
|
461
461
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
462
462
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
463
|
-
}>, "
|
|
463
|
+
}>, "labelWidth" | "labelPosition" | "requireAsteriskPosition" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
464
464
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
465
465
|
validateField: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
466
466
|
resetFields: (props?: import('element-plus/es/utils/typescript.mjs').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -526,12 +526,12 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
526
526
|
onQuery?: ((value: import('./types').VroElSchemaFilterQueryValue) => any) | undefined;
|
|
527
527
|
}>, {}, {}, {}, {}, {
|
|
528
528
|
loading: boolean;
|
|
529
|
+
labelWidth: string | number;
|
|
530
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
529
531
|
colProps: Partial<import('element-plus').ColProps>;
|
|
530
532
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
531
|
-
labelWidth: string | number;
|
|
532
533
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
533
534
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
534
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
535
535
|
}>;
|
|
536
536
|
__isFragment?: never;
|
|
537
537
|
__isTeleport?: never;
|
|
@@ -572,12 +572,12 @@ export declare const VroElSchemaFilter: import('@vrojs/base').WithInstall<{
|
|
|
572
572
|
query: (value: import('./types').VroElSchemaFilterQueryValue) => any;
|
|
573
573
|
}, string, {
|
|
574
574
|
loading: boolean;
|
|
575
|
+
labelWidth: string | number;
|
|
576
|
+
schema: import('..').VroElSchemaFormSchema;
|
|
575
577
|
colProps: Partial<import('element-plus').ColProps>;
|
|
576
578
|
formItemProps: Partial<import('element-plus').FormItemProps>;
|
|
577
|
-
labelWidth: string | number;
|
|
578
579
|
formProps: Partial<Omit<import('element-plus').FormProps, "rules" | "model">>;
|
|
579
580
|
rowProps: Partial<import('element-plus').RowProps>;
|
|
580
|
-
schema: import('..').VroElSchemaFormSchema;
|
|
581
581
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
582
582
|
$slots: Readonly<import('./types').VroElSchemaFilterSlots> & import('./types').VroElSchemaFilterSlots;
|
|
583
583
|
})>;
|