fix(menu): 修复子菜单按钮样式并更新组件类型声明

更新GhostButton的样式属性,将class改为variant和color
同时优化全局组件类型声明,直接引用Button类型
This commit is contained in:
dap 2026-01-13 20:16:02 +08:00
parent efe744cfdd
commit cb94bc5eca
2 changed files with 8 additions and 4 deletions

View File

@ -240,7 +240,8 @@ const isAdmin = computed(() => {
<!-- '按钮类型'无法再添加子菜单 -->
<ghost-button
v-if="row.menuType !== 'F'"
class="btn-success"
variant="link"
color="green"
v-access:code="['system:menu:add']"
v-access:role="['superadmin']"
@click="handleSubAdd(row)"

View File

@ -1,9 +1,12 @@
export {};
import { Button } from 'antdv-next/dist/button/Button';
/* eslint-disable unicorn/require-module-specifiers */
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
AButton: typeof import('antdv-next/es/button')['default'];
GhostButton: typeof import('#/components/global/button')['GhostButton']
AButton: typeof Button;
GhostButton: typeof Button;
}
}
export {};