Commit db7254a5e0ac6d10a7ea37334ad523b150facb19
1 parent
dc51e6a8
fix(table-action): fix `circle` button style
修复table-action组件内的圆形按钮内容没有居中的问题
Showing
2 changed files
with
11 additions
and
13 deletions
CHANGELOG.zh_CN.md
@@ -13,7 +13,9 @@ | @@ -13,7 +13,9 @@ | ||
13 | - 新增`headerTop`插槽 | 13 | - 新增`headerTop`插槽 |
14 | - 修复操作列的按钮在 disabled 状态下的颜色显示 | 14 | - 修复操作列的按钮在 disabled 状态下的颜色显示 |
15 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 | 15 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 |
16 | -- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件 | 16 | +- **TableAction** |
17 | + - 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件 | ||
18 | + - 修复组件内的圆形按钮内容没有居中的问题 | ||
17 | - **BasicUpload** 修复处理非`array`值时报错的问题 | 19 | - **BasicUpload** 修复处理非`array`值时报错的问题 |
18 | - **Form** 修复`FormItem`的`suffix`插槽样式问题 | 20 | - **Form** 修复`FormItem`的`suffix`插槽样式问题 |
19 | - **Menu** | 21 | - **Menu** |
src/components/Table/src/components/TableAction.vue
@@ -3,22 +3,12 @@ | @@ -3,22 +3,12 @@ | ||
3 | <template v-for="(action, index) in getActions" :key="`${index}-${action.label}`"> | 3 | <template v-for="(action, index) in getActions" :key="`${index}-${action.label}`"> |
4 | <Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)"> | 4 | <Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)"> |
5 | <PopConfirmButton v-bind="action"> | 5 | <PopConfirmButton v-bind="action"> |
6 | - <Icon | ||
7 | - :icon="action.icon" | ||
8 | - :class="{ 'mr-1': action.label }" | ||
9 | - :style="{ margin: action.label ? '' : 'auto !important' }" | ||
10 | - v-if="action.icon" | ||
11 | - /> | 6 | + <Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" /> |
12 | <template v-if="action.label">{{ action.label }}</template> | 7 | <template v-if="action.label">{{ action.label }}</template> |
13 | </PopConfirmButton> | 8 | </PopConfirmButton> |
14 | </Tooltip> | 9 | </Tooltip> |
15 | <PopConfirmButton v-else v-bind="action"> | 10 | <PopConfirmButton v-else v-bind="action"> |
16 | - <Icon | ||
17 | - :icon="action.icon" | ||
18 | - :class="{ 'mr-1': action.label }" | ||
19 | - :style="{ margin: action.label ? '' : 'auto !important' }" | ||
20 | - v-if="action.icon" | ||
21 | - /> | 11 | + <Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" /> |
22 | <template v-if="action.label">{{ action.label }}</template> | 12 | <template v-if="action.label">{{ action.label }}</template> |
23 | </PopConfirmButton> | 13 | </PopConfirmButton> |
24 | <Divider | 14 | <Divider |
@@ -192,6 +182,12 @@ | @@ -192,6 +182,12 @@ | ||
192 | } | 182 | } |
193 | } | 183 | } |
194 | 184 | ||
185 | + button.ant-btn-circle { | ||
186 | + span { | ||
187 | + margin: auto !important; | ||
188 | + } | ||
189 | + } | ||
190 | + | ||
195 | .ant-divider, | 191 | .ant-divider, |
196 | .ant-divider-vertical { | 192 | .ant-divider-vertical { |
197 | margin: 0 2px; | 193 | margin: 0 2px; |