Skip to content

Commit

Permalink
feat(web): update delete auth
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie committed Nov 28, 2024
1 parent a81653c commit 76c3d2c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/components/advanced/table-header-operation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function refresh() {
</template>
{{ $t('common.add') }}
</NButton>
<NPopconfirm @positive-click="batchDelete">
<NPopconfirm v-if="deleteAuth && hasAuth(deleteAuth)" placement="bottom" @positive-click="batchDelete">
<template #trigger>
<NButton size="small" ghost type="error" :disabled="disabledDelete">
<template #icon>
Expand Down
11 changes: 11 additions & 0 deletions web/src/typings/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,20 @@ declare namespace App {
user: {
list: string;
add: string;
delete: string;
edit: string;
};
menu: {
list: string;
add: string;
delete: string;
edit: string;
};
role: {
list: string;
add: string;
delete: string;
edit: string;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions web/src/views/manage/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ init();
:disabled-delete="checkedRowKeys.length === 0"
:loading="loading"
add-auth="manage:menu:add"
delete-auth="manage:menu:delete"
@add="handleAdd"
@delete="handleBatchDelete"
@refresh="getData"
Expand Down
1 change: 1 addition & 0 deletions web/src/views/manage/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function edit(id: number) {
:disabled-delete="checkedRowKeys.length === 0"
:loading="loading"
add-auth="manage:role:add"
delete-auth="manage:role:delete"
@add="handleAdd"
@delete="handleBatchDelete"
@refresh="getData"
Expand Down

0 comments on commit 76c3d2c

Please sign in to comment.