mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
优化
This commit is contained in:
parent
d52ebdeda6
commit
48794d4e21
@ -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
|
||||
};
|
||||
});
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user