perf: 优化角色创建时权限没有提示

This commit is contained in:
ibuler
2023-10-17 15:19:36 +08:00
committed by 老广
parent 031016330a
commit 7b15ca4955
2 changed files with 19 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="input-text"> <div :class="bolder ? 'bolder' : ''" class="input-text">
{{ value.toString() }} {{ value.toString() || text }}
</div> </div>
</template> </template>
@@ -9,7 +9,15 @@ export default {
props: { props: {
value: { value: {
type: [String, Boolean], type: [String, Boolean],
default: () => false default: ''
},
text: {
type: String,
default: ''
},
bolder: {
type: Boolean,
default: true
} }
}, },
data() { data() {
@@ -20,12 +28,14 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.input-text { .input-text {
border: solid 1px #dcdfe6;
line-height: 32px; line-height: 32px;
padding-left: 5px; padding-left: 8px;
height: 32px; height: 32px;
margin-top: 4px; margin-top: 4px;
font-size: 13px; font-size: 13px;
} }
.bolder {
border: solid 1px #dcdfe6;
}
</style> </style>

View File

@@ -4,7 +4,7 @@
<script> <script>
import { GenericCreateUpdatePage } from '@/layout/components' import { GenericCreateUpdatePage } from '@/layout/components'
import { Text } from '@/components/Form/FormFields' import { TextReadonly } from '@/components/Form/FormFields'
export default { export default {
components: { components: {
@@ -33,9 +33,10 @@ export default {
readonly: true readonly: true
}, },
permissions: { permissions: {
component: Text, component: TextReadonly,
el: { el: {
text: this.$t('users.HelpText.addRolePermissions') text: this.$t('users.HelpText.addRolePermissions'),
bolder: false
} }
} }
} }