瀏覽代碼

fix: style property of actionColOpt is invalid (#997)

Lowell 3 年之前
父節點
當前提交
225bd4c39d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/components/Form/src/components/FormAction.vue

+ 3 - 2
src/components/Form/src/components/FormAction.vue

@@ -1,6 +1,6 @@
 <template>
-  <a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup">
-    <div style="width: 100%; text-align: right">
+  <a-col v-bind="actionColOpt" v-if="showActionButtonGroup">
+    <div style="width: 100%" :style="{ textAlign: actionColOpt.style.textAlign }">
       <FormItem>
         <slot name="resetBefore"></slot>
         <Button
@@ -92,6 +92,7 @@
           ? { span: actionSpan < 6 ? 24 : actionSpan }
           : {};
         const actionColOpt: Partial<ColEx> = {
+          style: { textAlign: 'right' },
           span: showAdvancedButton ? 6 : 4,
           ...advancedSpanObj,
           ...actionColOptions,