@aspire-ui/element-component-pro 1.0.4 → 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 +2 -0
- package/dist/ProForm/ProForm.vue.d.ts +3 -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 +582 -559
- 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 +46 -26
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -2
- package/src/ProForm/ProForm.vue +62 -17
- package/src/ProForm/ProFormItem.vue +2 -1
- package/src/types/index.ts +1 -0
package/README.md
CHANGED
|
@@ -311,6 +311,8 @@ const handleSubmit = (values) => {
|
|
|
311
311
|
- **dynamicDisabled**: 动态禁用
|
|
312
312
|
- **dynamicRules**: 动态校验规则
|
|
313
313
|
- **labelWidth**: 支持字段级标签宽度,覆盖表单级 `labelWidth`
|
|
314
|
+
- **v-model**: 支持 `modelValue` 双向绑定,`initialValues` 仅补齐缺失字段
|
|
315
|
+
- **useForm + v-model**: 编程式 `setFieldsValue/resetFields` 与受控 `modelValue` 保持同步
|
|
314
316
|
- **componentProps**: 支持函数,可获取 formModel、formActionType
|
|
315
317
|
|
|
316
318
|
## 示例与文档
|
|
@@ -49,6 +49,7 @@ declare function __VLS_template(): Partial<Record<string, (_: {
|
|
|
49
49
|
};
|
|
50
50
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
51
51
|
schemas?: ProFormSchema[];
|
|
52
|
+
modelValue?: Record<string, unknown>;
|
|
52
53
|
initialValues?: Record<string, unknown>;
|
|
53
54
|
labelWidth?: string;
|
|
54
55
|
labelPosition?: "left" | "right" | "top";
|
|
@@ -123,8 +124,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
123
124
|
submit: (values: Record<string, unknown>) => void;
|
|
124
125
|
reset: () => void;
|
|
125
126
|
register: (formAction: FormActionType) => void;
|
|
127
|
+
"update:modelValue": (values: Record<string, unknown>) => void;
|
|
126
128
|
}, string, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
127
129
|
schemas?: ProFormSchema[];
|
|
130
|
+
modelValue?: Record<string, unknown>;
|
|
128
131
|
initialValues?: Record<string, unknown>;
|
|
129
132
|
labelWidth?: string;
|
|
130
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;
|