优化控制台出现的ElOnlyChild错误

This commit is contained in:
RuoYi 2022-03-27 21:13:43 +08:00
parent c58003056f
commit 32ee59f763
2 changed files with 8 additions and 16 deletions

View File

@ -115,36 +115,32 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-tooltip content="修改" placement="top" v-if="scope.row.roleId !== 1">
<el-button
v-if="scope.row.roleId !== 1"
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-tooltip content="删除" placement="top" v-if="scope.row.roleId !== 1">
<el-button
v-if="scope.row.roleId !== 1"
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
></el-button>
</el-tooltip>
<el-tooltip content="数据权限" placement="top">
<el-tooltip content="数据权限" placement="top" v-if="scope.row.roleId !== 1">
<el-button
v-if="scope.row.roleId !== 1"
type="text"
icon="CircleCheck"
@click="handleDataScope(scope.row)"
v-hasPermi="['system:role:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="分配用户" placement="top">
<el-tooltip content="分配用户" placement="top" v-if="scope.row.roleId !== 1">
<el-button
v-if="scope.row.roleId !== 1"
type="text"
icon="User"
@click="handleAuthUser(scope.row)"

View File

@ -151,36 +151,32 @@
</el-table-column>
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
<template #default="scope">
<el-tooltip content="修改" placement="top">
<el-tooltip content="修改" placement="top" v-if="scope.row.userId !== 1">
<el-button
v-if="scope.row.userId !== 1"
type="text"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:user:edit']"
></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-tooltip content="删除" placement="top" v-if="scope.row.userId !== 1">
<el-button
v-if="scope.row.userId !== 1"
type="text"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:user:remove']"
></el-button>
</el-tooltip>
<el-tooltip content="重置密码" placement="top">
<el-tooltip content="重置密码" placement="top" v-if="scope.row.userId !== 1">
<el-button
v-if="scope.row.userId !== 1"
type="text"
icon="Key"
@click="handleResetPwd(scope.row)"
v-hasPermi="['system:user:resetPwd']"
></el-button>
</el-tooltip>
<el-tooltip content="分配角色" placement="top">
<el-tooltip content="分配角色" placement="top" v-if="scope.row.userId !== 1">
<el-button
v-if="scope.row.userId !== 1"
type="text"
icon="CircleCheck"
@click="handleAuthRole(scope.row)"