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 = []; list.value = [];
} }
// 设置标题
function setTitle(title: string) {
const item = list.value.find((e) => e.active);
if (item) {
item.meta.label = title;
}
}
return { return {
list, list,
add, add,
remove, remove,
set, set,
clear clear,
setTitle
}; };
}); });

View File

@ -123,7 +123,7 @@ const Table = useTable({
(row) => { (row) => {
return { return {
label: "新增", label: "新增",
hidden: row.type == 2, hidden: !(row.type != 2 && service.base.sys.user._permission.add),
callback(done) { callback(done) {
append(row); append(row);
done(); done();
@ -135,7 +135,7 @@ const Table = useTable({
(row) => { (row) => {
return { return {
label: "添加权限", label: "添加权限",
hidden: row.type != 1, hidden: !(row.type == 1 && service.base.sys.user._permission.add),
callback(done) { callback(done) {
addPermission(row); addPermission(row);
done(); done();