diff --git a/apps/web-antd/src/views/system/menu/data.ts b/apps/web-antd/src/views/system/menu/data.ts index 209c1a7e7..477c91f7b 100644 --- a/apps/web-antd/src/views/system/menu/data.ts +++ b/apps/web-antd/src/views/system/menu/data.ts @@ -271,6 +271,7 @@ export function useGridColumns(): VxeTableGridOptions['colum { field: 'name', title: '菜单名称', + minWidth: 250, align: 'left', fixed: 'left', slots: { default: 'name' }, @@ -279,6 +280,7 @@ export function useGridColumns(): VxeTableGridOptions['colum { field: 'type', title: '菜单类型', + minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.SYSTEM_MENU_TYPE }, @@ -287,22 +289,27 @@ export function useGridColumns(): VxeTableGridOptions['colum { field: 'sort', title: '显示排序', + minWidth: 100, }, { field: 'permission', title: '权限标识', + minWidth: 200, }, { field: 'path', title: '组件路径', + minWidth: 200, }, { field: 'componentName', title: '组件名称', + minWidth: 200, }, { field: 'status', title: '状态', + minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.COMMON_STATUS }, diff --git a/apps/web-antd/src/views/system/menu/index.vue b/apps/web-antd/src/views/system/menu/index.vue index 2e9cf8f5f..3ff14471a 100644 --- a/apps/web-antd/src/views/system/menu/index.vue +++ b/apps/web-antd/src/views/system/menu/index.vue @@ -23,7 +23,7 @@ const [FormModal, formModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -34,7 +34,7 @@ function handleCreate() { /** 添加下级菜单 */ function handleAppend(row: SystemMenuApi.Menu) { - formModalApi.setData({ pid: row.id }).open(); + formModalApi.setData({ parentId: row.id }).open(); } /** 编辑菜单 */ @@ -46,15 +46,12 @@ function handleEdit(row: SystemMenuApi.Menu) { async function handleDelete(row: SystemMenuApi.Menu) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.name]), - key: 'action_key_msg', + duration: 0, }); try { await deleteMenu(row.id as number); - message.success({ - content: $t('ui.actionMessage.deleteSuccess', [row.name]), - key: 'action_key_msg', - }); - onRefresh(); + message.success($t('ui.actionMessage.deleteSuccess', [row.name])); + handleRefresh(); } finally { hideLoading(); } @@ -62,7 +59,7 @@ async function handleDelete(row: SystemMenuApi.Menu) { /** 切换树形展开/收缩状态 */ const isExpanded = ref(false); -function toggleExpand() { +function handleExpand() { isExpanded.value = !isExpanded.value; gridApi.grid.setAllTreeExpand(isExpanded.value); } @@ -84,6 +81,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -94,7 +92,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ transform: true, reserve: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); @@ -108,8 +106,8 @@ const [Grid, gridApi] = useVbenVxeGrid({ - - + +