diff --git a/src/modules/base/store/process.ts b/src/modules/base/store/process.ts index 527c7fa..3f52a30 100644 --- a/src/modules/base/store/process.ts +++ b/src/modules/base/store/process.ts @@ -40,11 +40,21 @@ export const useProcessStore = defineStore("process", function () { list.value = []; } + // 设置标题 + function setTitle(title: string) { + const item = list.value.find((e) => e.active); + + if (item) { + item.meta.label = title; + } + } + return { list, add, remove, set, - clear + clear, + setTitle }; }); diff --git a/src/modules/base/views/menu.vue b/src/modules/base/views/menu.vue index 2de679a..10d7276 100644 --- a/src/modules/base/views/menu.vue +++ b/src/modules/base/views/menu.vue @@ -123,7 +123,7 @@ const Table = useTable({ (row) => { return { label: "新增", - hidden: row.type == 2, + hidden: !(row.type != 2 && service.base.sys.user._permission.add), callback(done) { append(row); done(); @@ -135,7 +135,7 @@ const Table = useTable({ (row) => { return { label: "添加权限", - hidden: row.type != 1, + hidden: !(row.type == 1 && service.base.sys.user._permission.add), callback(done) { addPermission(row); done();