From a784bc7db27515d053aca451c104d220e4742657 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 17 Mar 2023 23:23:24 +0800 Subject: [PATCH] =?UTF-8?q?Form=20=E7=BB=84=E4=BB=B6=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20vLoading=20=E5=8A=A0=E8=BD=BD=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/Form.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 5e5120c3..c1121641 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -35,7 +35,8 @@ export default defineComponent({ default: () => [] }, // 是否需要栅格布局 - isCol: propTypes.bool.def(true), + // update by 芋艿:将 true 改成 false,因为项目更常用这种方式 + isCol: propTypes.bool.def(false), // 表单数据对象 model: { type: Object as PropType, @@ -46,7 +47,9 @@ export default defineComponent({ // 是否自定义内容 isCustom: propTypes.bool.def(false), // 表单label宽度 - labelWidth: propTypes.oneOfType([String, Number]).def('auto') + labelWidth: propTypes.oneOfType([String, Number]).def('auto'), + // 是否 loading 数据中 add by 芋艿 + vLoading: propTypes.bool.def(false) }, emits: ['register'], setup(props, { slots, expose, emit }) { @@ -280,6 +283,7 @@ export default defineComponent({ {...getFormBindValue()} model={props.isCustom ? props.model : formModel} class={prefixCls} + v-loading={props.vLoading} > {{ // 如果需要自定义,就什么都不渲染,而是提供默认插槽