This commit is contained in:
icssoa 2022-08-02 16:00:45 +08:00
parent d52ebdeda6
commit 48794d4e21
2 changed files with 13 additions and 3 deletions

View File

@ -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
};
});

View File

@ -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();