feat: 添加系统管理-菜单管理 (#929)

* feat: 添加系统管理-菜单管理

* chore: update

* chore: add Copyright in login page

* chore: 将页脚放在一屏可视区

* chore: 依赖更新

* chore: update

* chore: update

* chore: 更新依赖

* chore: update `husky v9`

* style: 适配`el-dialog`样式的更新

* style: update `src/layout/components/search/components/SearchResult.vue`

* chore: update

* style: update

* fix: 修复`ReDialog`中点击取消和确定按钮会触发两次关闭回调

* chore: update

* chore: update src/views/system/menu/README.md

* chore: update

* chore: update

* chore: done

* chore: update
This commit is contained in:
xiaoming
2024-02-26 22:17:40 +08:00
committed by GitHub
parent f762587fa7
commit c314b0cd1c
45 changed files with 2743 additions and 1118 deletions

View File

@@ -15,19 +15,26 @@ defineOptions({
<div class="card-header">组件方式判断权限</div>
</template>
<el-space wrap>
<Auth value="btn_add">
<Auth value="permission:btn:add">
<el-button plain type="warning">
拥有code'btn_add' 权限可见
拥有code'permission:btn:add' 权限可见
</el-button>
</Auth>
<Auth :value="['btn_edit']">
<Auth :value="['permission:btn:edit']">
<el-button plain type="primary">
拥有code['btn_edit'] 权限可见
拥有code['permission:btn:edit'] 权限可见
</el-button>
</Auth>
<Auth :value="['btn_add', 'btn_edit', 'btn_delete']">
<Auth
:value="[
'permission:btn:add',
'permission:btn:edit',
'permission:btn:delete'
]"
>
<el-button plain type="danger">
拥有code['btn_add', 'btn_edit', 'btn_delete'] 权限可见
拥有code['permission:btn:add', 'permission:btn:edit',
'permission:btn:delete'] 权限可见
</el-button>
</Auth>
</el-space>
@@ -38,18 +45,25 @@ defineOptions({
<div class="card-header">函数方式判断权限</div>
</template>
<el-space wrap>
<el-button v-if="hasAuth('btn_add')" plain type="warning">
拥有code'btn_add' 权限可见
<el-button v-if="hasAuth('permission:btn:add')" plain type="warning">
拥有code'permission:btn:add' 权限可见
</el-button>
<el-button v-if="hasAuth(['btn_edit'])" plain type="primary">
拥有code['btn_edit'] 权限可见
<el-button v-if="hasAuth(['permission:btn:edit'])" plain type="primary">
拥有code['permission:btn:edit'] 权限可见
</el-button>
<el-button
v-if="hasAuth(['btn_add', 'btn_edit', 'btn_delete'])"
v-if="
hasAuth([
'permission:btn:add',
'permission:btn:edit',
'permission:btn:delete'
])
"
plain
type="danger"
>
拥有code['btn_add', 'btn_edit', 'btn_delete'] 权限可见
拥有code['permission:btn:add', 'permission:btn:edit',
'permission:btn:delete'] 权限可见
</el-button>
</el-space>
</el-card>
@@ -61,18 +75,23 @@ defineOptions({
</div>
</template>
<el-space wrap>
<el-button v-auth="'btn_add'" plain type="warning">
拥有code'btn_add' 权限可见
<el-button v-auth="'permission:btn:add'" plain type="warning">
拥有code'permission:btn:add' 权限可见
</el-button>
<el-button v-auth="['btn_edit']" plain type="primary">
拥有code['btn_edit'] 权限可见
<el-button v-auth="['permission:btn:edit']" plain type="primary">
拥有code['permission:btn:edit'] 权限可见
</el-button>
<el-button
v-auth="['btn_add', 'btn_edit', 'btn_delete']"
v-auth="[
'permission:btn:add',
'permission:btn:edit',
'permission:btn:delete'
]"
plain
type="danger"
>
拥有code['btn_add', 'btn_edit', 'btn_delete'] 权限可见
拥有code['permission:btn:add', 'permission:btn:edit',
'permission:btn:delete'] 权限可见
</el-button>
</el-space>
</el-card>