@aspire-ui/element-component-pro 1.0.3 → 1.0.5
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/README.md +3 -0
- package/dist/ProForm/ProForm.vue.d.ts +4 -0
- package/dist/ProForm/ProFormItem.vue.d.ts +2 -0
- package/dist/ProTable/ProTable.vue.d.ts +1 -1
- package/dist/element-component-pro.es.js +633 -596
- package/dist/element-component-pro.es.js.map +1 -1
- package/dist/element-component-pro.umd.js +2 -2
- package/dist/element-component-pro.umd.js.map +1 -1
- package/dist/index.d.ts +47 -26
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +3 -2
- package/src/ProForm/ProForm.vue +62 -17
- package/src/ProForm/ProFormItem.vue +3 -1
- package/src/ProTable/TableAction.vue +16 -5
- package/src/types/index.ts +3 -0
package/README.md
CHANGED
|
@@ -310,6 +310,9 @@ const handleSubmit = (values) => {
|
|
|
310
310
|
- **ifShow** / **show**: 动态显示(ifShow 不渲染 DOM)
|
|
311
311
|
- **dynamicDisabled**: 动态禁用
|
|
312
312
|
- **dynamicRules**: 动态校验规则
|
|
313
|
+
- **labelWidth**: 支持字段级标签宽度,覆盖表单级 `labelWidth`
|
|
314
|
+
- **v-model**: 支持 `modelValue` 双向绑定,`initialValues` 仅补齐缺失字段
|
|
315
|
+
- **useForm + v-model**: 编程式 `setFieldsValue/resetFields` 与受控 `modelValue` 保持同步
|
|
313
316
|
- **componentProps**: 支持函数,可获取 formModel、formActionType
|
|
314
317
|
|
|
315
318
|
## 示例与文档
|
|
@@ -5,6 +5,7 @@ declare function __VLS_template(): Partial<Record<string, (_: {
|
|
|
5
5
|
schema: {
|
|
6
6
|
field: string;
|
|
7
7
|
label: string;
|
|
8
|
+
labelWidth?: string | undefined;
|
|
8
9
|
component?: (import('..').ProFormBuiltInComponent | import('..').ProFormCustomComponent) | undefined;
|
|
9
10
|
componentProps?: (Record<string, unknown> | ((params: import('..').RenderCallbackParams & {
|
|
10
11
|
formActionType?: FormActionType;
|
|
@@ -48,6 +49,7 @@ declare function __VLS_template(): Partial<Record<string, (_: {
|
|
|
48
49
|
};
|
|
49
50
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
50
51
|
schemas?: ProFormSchema[];
|
|
52
|
+
modelValue?: Record<string, unknown>;
|
|
51
53
|
initialValues?: Record<string, unknown>;
|
|
52
54
|
labelWidth?: string;
|
|
53
55
|
labelPosition?: "left" | "right" | "top";
|
|
@@ -122,8 +124,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
122
124
|
submit: (values: Record<string, unknown>) => void;
|
|
123
125
|
reset: () => void;
|
|
124
126
|
register: (formAction: FormActionType) => void;
|
|
127
|
+
"update:modelValue": (values: Record<string, unknown>) => void;
|
|
125
128
|
}, string, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
126
129
|
schemas?: ProFormSchema[];
|
|
130
|
+
modelValue?: Record<string, unknown>;
|
|
127
131
|
initialValues?: Record<string, unknown>;
|
|
128
132
|
labelWidth?: string;
|
|
129
133
|
labelPosition?: "left" | "right" | "top";
|
|
@@ -14,6 +14,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
|
|
|
14
14
|
formDisabled?: boolean;
|
|
15
15
|
autoPlaceholder?: boolean;
|
|
16
16
|
formActionType?: import('../types').FormActionType;
|
|
17
|
+
onFieldChange?: (field: string, value: unknown) => void;
|
|
17
18
|
/** 自定义组件映射(由 ProForm 传入) */
|
|
18
19
|
customComponents?: Record<string, unknown>;
|
|
19
20
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -22,6 +23,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRu
|
|
|
22
23
|
formDisabled?: boolean;
|
|
23
24
|
autoPlaceholder?: boolean;
|
|
24
25
|
formActionType?: import('../types').FormActionType;
|
|
26
|
+
onFieldChange?: (field: string, value: unknown) => void;
|
|
25
27
|
/** 自定义组件映射(由 ProForm 传入) */
|
|
26
28
|
customComponents?: Record<string, unknown>;
|
|
27
29
|
}>>>, {}>;
|
|
@@ -374,6 +374,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
374
374
|
}>>>, {
|
|
375
375
|
loading: boolean;
|
|
376
376
|
size: "medium" | "small" | "large";
|
|
377
|
+
immediate: boolean;
|
|
377
378
|
rowKey: string;
|
|
378
379
|
bordered: boolean;
|
|
379
380
|
striped: boolean;
|
|
@@ -393,7 +394,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
393
394
|
fullScreen?: boolean;
|
|
394
395
|
};
|
|
395
396
|
fetchSetting: FetchSetting;
|
|
396
|
-
immediate: boolean;
|
|
397
397
|
}>;
|
|
398
398
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
399
399
|
export default _default;
|