chore: replace to ghost-button

This commit is contained in:
dap
2024-10-07 16:56:32 +08:00
parent 3edad0459d
commit 0f31c8df57
22 changed files with 326 additions and 323 deletions

View File

@@ -6,7 +6,12 @@ import { computed } from 'vue';
import { useAccess } from '@vben/access';
import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui';
import { Fallback } from '@vben/common-ui';
import { eachTree, listToTree, removeEmptyChildren } from '@vben/utils';
import {
eachTree,
getPopupContainer,
listToTree,
removeEmptyChildren,
} from '@vben/utils';
import { Popconfirm, Space, Tooltip } from 'ant-design-vue';
@@ -153,29 +158,28 @@ const isAdmin = computed(() => {
</Space>
</template>
<template #action="{ row }">
<a-button
size="small"
type="link"
v-access:code="['system:menu:edit']"
@click="handleEdit(row)"
>
{{ $t('pages.common.edit') }}
</a-button>
<Popconfirm
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"
>
<a-button
danger
size="small"
type="link"
v-access:code="['system:menu:remove']"
@click.stop=""
<Space>
<ghost-button
v-access:code="['system:menu:edit']"
@click="handleEdit(row)"
>
{{ $t('pages.common.delete') }}
</a-button>
</Popconfirm>
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getPopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"
>
<ghost-button
danger
v-access:code="['system:menu:remove']"
@click.stop=""
>
{{ $t('pages.common.delete') }}
</ghost-button>
</Popconfirm>
</Space>
</template>
</BasicTable>
<MenuDrawer @reload="tableApi.query()" />