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 <ghost-button
v-if="row.menuType !== 'F'" v-if="row.menuType !== 'F'"
class="btn-success" variant="link"
color="green"
v-access:code="['system:menu:add']" v-access:code="['system:menu:add']"
v-access:role="['superadmin']" v-access:role="['superadmin']"
@click="handleSubAdd(row)" @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 */ /* prettier-ignore */
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
AButton: typeof import('antdv-next/es/button')['default']; AButton: typeof Button;
GhostButton: typeof import('#/components/global/button')['GhostButton'] GhostButton: typeof Button;
} }
} }
export {};