From 78ef773b36b79fef0a3140c2aac5ad389ec06303 Mon Sep 17 00:00:00 2001 From: kooriookami <38392315+kooriookami@users.noreply.github.com> Date: Sat, 10 Jul 2021 21:33:14 +0800 Subject: [PATCH] fix(form): add default value of label-width (#2492) fix #2490 --- packages/form/src/form-item.vue | 5 ++++- packages/form/src/form.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/form/src/form-item.vue b/packages/form/src/form-item.vue index 87bdce504e..24f437063a 100644 --- a/packages/form/src/form-item.vue +++ b/packages/form/src/form-item.vue @@ -63,7 +63,10 @@ export default defineComponent({ }, props: { label: String, - labelWidth: [String, Number], + labelWidth: { + type: [String, Number], + default: '', + }, prop: String, required: { type: Boolean, diff --git a/packages/form/src/form.vue b/packages/form/src/form.vue index 46bfdffd9f..6f888e401d 100644 --- a/packages/form/src/form.vue +++ b/packages/form/src/form.vue @@ -67,7 +67,10 @@ export default defineComponent({ model: Object, rules: Object as PropType, labelPosition: String, - labelWidth: [String, Number], + labelWidth: { + type: [String, Number], + default: '', + }, labelSuffix: { type: String, default: '',