perf: 优化显示

This commit is contained in:
xingyu 2022-11-17 00:39:18 +08:00
parent d677207af1
commit a595539e8b
2 changed files with 9 additions and 15 deletions

View File

@ -74,12 +74,12 @@
</template> </template>
</XModal> </XModal>
<XModal v-model="dialogScopeVisible" :title="dialogScopeTitle"> <XModal v-model="dialogScopeVisible" :title="dialogScopeTitle">
<el-form :model="dataScopeForm"> <el-form :model="dataScopeForm" label-width="140px" :inline="true">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-input v-model="dataScopeForm.name" :disabled="true" /> <el-tag>{{ dataScopeForm.name }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="角色标识"> <el-form-item label="角色标识">
<el-input v-model="dataScopeForm.code" :disabled="true" /> <el-tag>{{ dataScopeForm.code }}</el-tag>
</el-form-item> </el-form-item>
<!-- 分配角色的数据权限对话框 --> <!-- 分配角色的数据权限对话框 -->
<el-form-item label="权限范围" v-if="actionScopeType === 'data'"> <el-form-item label="权限范围" v-if="actionScopeType === 'data'">
@ -146,12 +146,12 @@ import { onMounted, reactive, ref, unref } from 'vue'
import { import {
ElForm, ElForm,
ElFormItem, ElFormItem,
ElInput,
ElSelect, ElSelect,
ElOption, ElOption,
ElTree, ElTree,
ElCard, ElCard,
ElSwitch ElSwitch,
ElTag
} from 'element-plus' } from 'element-plus'
import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'

View File

@ -158,12 +158,12 @@
</XModal> </XModal>
<!-- 分配用户角色 --> <!-- 分配用户角色 -->
<XModal v-model="roleDialogVisible" title="分配角色"> <XModal v-model="roleDialogVisible" title="分配角色">
<el-form :model="userRole" label-width="80px"> <el-form :model="userRole" label-width="140px" :inline="true">
<el-form-item label="用户名称"> <el-form-item label="用户名称">
<el-input v-model="userRole.username" :disabled="true" /> <el-tag>{{ userRole.username }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="用户昵称"> <el-form-item label="用户昵称">
<el-input v-model="userRole.nickname" :disabled="true" /> <el-tag>{{ userRole.nickname }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="角色"> <el-form-item label="角色">
<el-transfer <el-transfer
@ -180,13 +180,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<template #footer> <template #footer>
<!-- 按钮保存 --> <!-- 按钮保存 -->
<XButton <XButton type="primary" :title="t('action.save')" :loading="loading" @click="submitRole()" />
v-if="['create', 'update'].includes(actionType)"
type="primary"
:title="t('action.save')"
:loading="loading"
@click="submitRole()"
/>
<!-- 按钮关闭 --> <!-- 按钮关闭 -->
<XButton :title="t('dialog.close')" @click="roleDialogVisible = false" /> <XButton :title="t('dialog.close')" @click="roleDialogVisible = false" />
</template> </template>