mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 09:40:25 +08:00
fix(table-action): fixed icon margin
without label
修复当没有label时,icon没有在按钮内居中的问题
This commit is contained in:
parent
4b46a84c2b
commit
dc51e6a8d4
@ -3,13 +3,23 @@
|
||||
<template v-for="(action, index) in getActions" :key="`${index}-${action.label}`">
|
||||
<Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
|
||||
<PopConfirmButton v-bind="action">
|
||||
<Icon :icon="action.icon" class="mr-1" v-if="action.icon" />
|
||||
{{ action.label }}
|
||||
<Icon
|
||||
:icon="action.icon"
|
||||
:class="{ 'mr-1': action.label }"
|
||||
:style="{ margin: action.label ? '' : 'auto !important' }"
|
||||
v-if="action.icon"
|
||||
/>
|
||||
<template v-if="action.label">{{ action.label }}</template>
|
||||
</PopConfirmButton>
|
||||
</Tooltip>
|
||||
<PopConfirmButton v-else v-bind="action">
|
||||
<Icon :icon="action.icon" class="mr-1" v-if="action.icon" />
|
||||
{{ action.label }}
|
||||
<Icon
|
||||
:icon="action.icon"
|
||||
:class="{ 'mr-1': action.label }"
|
||||
:style="{ margin: action.label ? '' : 'auto !important' }"
|
||||
v-if="action.icon"
|
||||
/>
|
||||
<template v-if="action.label">{{ action.label }}</template>
|
||||
</PopConfirmButton>
|
||||
<Divider
|
||||
type="vertical"
|
||||
|
Loading…
Reference in New Issue
Block a user