瀏覽代碼

fix: 组件属性优先默认 (#2581)

luocong2016 2 年之前
父節點
當前提交
ed8cffb2a1
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      src/components/Form/src/components/FormItem.vue

+ 8 - 4
src/components/Form/src/components/FormItem.vue

@@ -80,10 +80,14 @@
           componentProps = componentProps({ schema, tableAction, formModel, formActionType }) ?? {};
         }
         if (schema.component === 'Divider') {
-          componentProps = Object.assign({ type: 'horizontal' }, componentProps, {
-            orientation: 'left',
-            plain: true,
-          });
+          componentProps = Object.assign(
+            { type: 'horizontal' },
+            {
+              orientation: 'left',
+              plain: true,
+            },
+            componentProps,
+          );
         }
         return componentProps as Recordable;
       });