Commit db7254a5e0ac6d10a7ea37334ad523b150facb19

Authored by 无木
1 parent dc51e6a8

fix(table-action): fix `circle` button style

修复table-action组件内的圆形按钮内容没有居中的问题
CHANGELOG.zh_CN.md
... ... @@ -13,7 +13,9 @@
13 13 - 新增`headerTop`插槽
14 14 - 修复操作列的按钮在 disabled 状态下的颜色显示
15 15 - **AppSearch** 修复可能会搜索隐藏菜单的问题
16   -- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
  16 +- **TableAction**
  17 + - 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
  18 + - 修复组件内的圆形按钮内容没有居中的问题
17 19 - **BasicUpload** 修复处理非`array`值时报错的问题
18 20 - **Form** 修复`FormItem`的`suffix`插槽样式问题
19 21 - **Menu**
... ...
src/components/Table/src/components/TableAction.vue
... ... @@ -3,22 +3,12 @@
3 3 <template v-for="(action, index) in getActions" :key="`${index}-${action.label}`">
4 4 <Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
5 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 7 <template v-if="action.label">{{ action.label }}</template>
13 8 </PopConfirmButton>
14 9 </Tooltip>
15 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 12 <template v-if="action.label">{{ action.label }}</template>
23 13 </PopConfirmButton>
24 14 <Divider
... ... @@ -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 191 .ant-divider,
196 192 .ant-divider-vertical {
197 193 margin: 0 2px;
... ...