Skip to content

Commit

Permalink
fix: style property of actionColOpt is invalid (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
weilence authored Jul 28, 2021
1 parent 7e6a89f commit 225bd4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Form/src/components/FormAction.vue
Original file line number Diff line number Diff line change
@@ -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">

This comment has been minimized.

Copy link
@Ariesly

Ariesly Jul 29, 2021

:style 属性必须在 v-bind 属性前边,不然从actionColOpt传过来的样式无法覆盖:style的默认值

<a-col :style="{ textAlign: actionColOpt.style.textAlign }" v-bind="actionColOpt" ...>

无需嵌套div

<div style="width: 100%" :style="{ textAlign: actionColOpt.style.textAlign }">
<FormItem>
<slot name="resetBefore"></slot>
<Button
Expand Down Expand Up @@ -92,6 +92,7 @@
? { span: actionSpan < 6 ? 24 : actionSpan }
: {};
const actionColOpt: Partial<ColEx> = {
style: { textAlign: 'right' },
span: showAdvancedButton ? 6 : 4,
...advancedSpanObj,
...actionColOptions,
Expand Down

0 comments on commit 225bd4c

Please sign in to comment.