diff --git a/web/src/modules/base/views/permission/menu/index.vue b/web/src/modules/base/views/permission/menu/index.vue index 4c39680e..2a8da12c 100644 --- a/web/src/modules/base/views/permission/menu/index.vue +++ b/web/src/modules/base/views/permission/menu/index.vue @@ -93,10 +93,10 @@ function createOrSaveMenu() { const elForm = getElFormRef() as typeof ElForm loading.value = true elForm.validate().then(() => { + if (!model.parent_id) { + model.parent_id = 0 + } if (model.dataType && model.dataType === 'add') { - if (!model.parent_id) { - model.parent_id = 0 - } create(model).then(async (res: any) => { res.code === ResultCode.SUCCESS ? msg.success(t('crud.createSuccess')) : msg.error(res.message) await getMenu() diff --git a/web/src/modules/base/views/welcome/index.vue b/web/src/modules/base/views/welcome/index.vue index 51060442..8b6e0019 100644 --- a/web/src/modules/base/views/welcome/index.vue +++ b/web/src/modules/base/views/welcome/index.vue @@ -13,6 +13,7 @@ import useTable from '@/hooks/useTable.ts' defineOptions({ name: 'welcome' }) const userinfo = useUserStore().getUserInfo() +console.log(useUserStore().getPermissions()) useTable('table').then((table: MaTableExpose) => { table.setColumns([ @@ -135,10 +136,26 @@ useTable('table').then((table: MaTableExpose) => {