2 Star 12 Fork 6

个人开源/mldong-art-design

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
index.vue 1.89 KB
Copy Edit Raw Blame History
mldong authored 2025-08-24 11:43 +08:00 . 9.11RBAC权限管理\·增加成员管理抽屉
<template>
<div class="role-page art-full-height">
<BasicCrud />
<AuthMenu ref="authMenuRef" />
<UserRole ref="userRoleRef" />
</div>
</template>
<script setup lang="tsx">
import { useCrud } from '@/components/crud'
import { crudSchema } from './schemas'
import AuthMenu from './auth-menu.vue'
import UserRole from './user-role.vue'
const authMenuRef = ref()
const userRoleRef = ref()
const [BasicCrud, crudApi] = useCrud({
...crudSchema,
tableActionColumn: {
width: 320
},
// 是否有修改
hasEdit: false,
// hasAdd: true,
// 左侧工具栏
toolbarActions: [],
// 左侧栏工具-下拉菜单
dropDownToolbarActions: [],
// 表格行操作
tableActions: [
{
label: '授权菜单',
type: 'primary',
sort: 1010,
link: true,
icon: 'ant-design:setting-outlined',
auth: 'sys:rbac:saveRoleMenu',
dialogRef: authMenuRef,
dialogParams(record) {
return {
data: record,
getCrudApi() {
return crudApi
}
}
}
},
{
label: '成员管理',
type: 'primary',
sort: 1010,
link: true,
icon: 'ant-design:team-outlined',
auth: 'sys:rbac:userListByRoleId',
dialogRef: userRoleRef,
dialogParams(record) {
return {
data: record,
getCrudApi() {
return crudApi
}
}
}
}
],
// 表格行操作-下拉菜单
dropDownActions: [
{
label: crudSchema.editButtonText || '编辑',
type: 'primary',
sort: 10,
link: true,
icon: 'ant-design:edit-outlined',
auth: crudSchema.editAuth,
onClick() {
crudApi.openEditDialog()
}
}
]
})
</script>
<style lang="scss" scoped></style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mldong/mldong-art-design.git
git@gitee.com:mldong/mldong-art-design.git
mldong
mldong-art-design
mldong-art-design
master

Search