Admin.UI/src/views/admin/role-permission.vue
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<template>
<section style="padding:10px;">
<el-row :gutter="10">
<el-col :xs="24" :sm="6" class="toolbar roles">
<el-card>
<template #header>
<div class="clearfix">
<span>角色</span>
<el-button
:loading="loadingRoles"
type="text"
style="float: right; padding: 3px 0"
@click="refreshRoles"
>刷新</el-button>
</div>
</template>
<el-collapse v-model="activeGroupList">
<el-collapse-item v-for="(group, index) in roleTree" v-show="group.children?.length > 0" :key="group.id" :name="group.id">
<template slot="title">
{{ group.name }}
</template>
<!--列表-->
<el-table
ref="table"
:data="group.children"
highlight-current-row
:show-header="false"
current-row-key="id"
@current-change="(currentRow, oldCurrentRow) => onCurrentChange(currentRow, oldCurrentRow, index)"
>
<template #empty>
<el-empty :image-size="50" />
</template>
<el-table-column prop="name" label="角色名" width />
</el-table>
</el-collapse-item>
</el-collapse>
</el-card>
</el-col>
<el-col :xs="24" :sm="18" class="toolbar perms">
<el-card>
<template #header>
<div class="clearfix">
<span>权限</span>
<my-confirm-button
v-if="checkPermission(['api:admin:permission:assign'])"
:validate="saveValidate"
:loading="loadingSave"
:disabled="loadingPermissions"
:placement="'left'"
type="text"
class="save"
style="float: right;"
@click="save"
>
<template #content>
<p>确定要保存吗?</p>
</template>
保存
</my-confirm-button>
后面还有 195 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
