perf: community user profile index err

This commit is contained in:
ibuler 2024-07-01 19:44:14 +08:00 committed by 老广
parent 7e3808c4b9
commit 265466c549
2 changed files with 79 additions and 72 deletions

View File

@ -1,15 +1,17 @@
<template>
<IBox :fa="fa" :title="title">
<el-form :label-width="labelWidth" class="content" label-position="left">
<el-form-item v-for="item in items" :key="item.key" :class="item.class" :label="item.key">
<span slot="label"> {{ formateLabel(item.key) }}</span>
<span
:is="item.component"
v-if="item.component"
v-bind="{...item}"
/>
<ItemValue v-else :value="item.value" class="item-value" v-bind="item" />
</el-form-item>
<span v-for="item in items" :key="item.key">
<el-form-item v-if="item.has !== false" :class="item.class" :label="item.key">
<span slot="label"> {{ formateLabel(item.key) }}</span>
<span
:is="item.component"
v-if="item.component"
v-bind="{...item}"
/>
<ItemValue v-else :value="item.value" class="item-value" v-bind="item" />
</el-form-item>
</span>
</el-form>
<slot />
</IBox>
@ -65,59 +67,59 @@ export default {
</script>
<style lang="scss" scoped>
.el-card__body {
padding: 20px 40px;
.el-card__body {
padding: 20px 40px;
}
.el-form-item {
border-bottom: 1px dashed #EBEEF5;
padding: 1px 0;
margin-bottom: 0;
&:last-child {
border-bottom: none;
}
.el-form-item {
border-bottom: 1px dashed #EBEEF5;
padding: 1px 0;
margin-bottom: 0;
&:last-child {
border-bottom: none;
}
&.array-item {
border-bottom: none;
::v-deep .el-form-item__content {
border-bottom: 1px dashed #EBEEF5
}
::v-deep .el-form-item__label:last-child {
border: 1px dashed #EBEEF5;
}
}
::v-deep .el-form-item__label {
padding-right: 8%;
overflow: hidden;
color: var(--color-icon-primary);
span {
display: inline-block;
line-height: 1.5;
}
}
&.array-item {
border-bottom: none;
::v-deep .el-form-item__content {
color: var(--color-text-primary);
font-size: 13px;
line-height: 40px;
border-bottom: 1px dashed #EBEEF5
}
::v-deep .el-tag--mini {
margin-right: 3px;
::v-deep .el-form-item__label:last-child {
border: 1px dashed #EBEEF5;
}
}
.item-value span {
word-break: break-word;
::v-deep .el-form-item__label {
padding-right: 8%;
overflow: hidden;
color: var(--color-icon-primary);
span {
display: inline-block;
line-height: 1.5;
}
}
.content {
::v-deep .el-form-item__content {
color: var(--color-text-primary);
font-size: 13px;
line-height: 2.5;
line-height: 40px;
}
::v-deep .el-tag--mini {
margin-right: 3px;
}
}
.item-value span {
word-break: break-word;
}
.content {
font-size: 13px;
line-height: 2.5;
}
</style>

View File

@ -21,12 +21,16 @@
<IBox :title="$tc('InformationModification')" fa="fa-edit">
<table>
<tr>
<td> {{ $t('Phone') }} </td>
<td><PhoneInput :value="object.phone" /></td>
<td> {{ $t('Phone') }}</td>
<td>
<PhoneInput :value="object.phone" />
</td>
</tr>
<tr>
<td> {{ $t('WeChat') }} </td>
<td><el-input v-model="object.wechat" /></td>
<td> {{ $t('WeChat') }}</td>
<td>
<el-input v-model="object.wechat" />
</td>
</tr>
</table>
<el-button
@ -324,16 +328,17 @@ export default {
}
},
{
value: this.object.groups.map(item => item.name).join(' '),
value: this.object.groups?.map(item => item.name).join(' '),
key: this.$t('UserGroups')
},
{
value: this.object.system_roles.map(item => item.display_name).join(' '),
value: this.object.system_roles?.map(item => item.display_name).join(' '),
key: this.$t('SystemRoles')
},
{
value: this.object.org_roles.map(item => item.display_name).join(' '),
key: this.$t('OrgRoles')
value: this.object.org_roles?.map(item => item.display_name).join(' '),
key: this.$t('OrgRoles'),
has: !!this.object.org_roles
},
{
value: this.object,
@ -459,19 +464,19 @@ export default {
}
</script>
<style scoped>
.ibox ::v-deep table {
width: 100%;
}
.ibox ::v-deep table {
width: 100%;
}
.ibox ::v-deep tr > td > span:first-child {
line-height: 1.43;
padding-right: 30px;
vertical-align: top;
font-size: 13px;
width: 50%;
}
.ibox ::v-deep tr > td > span:first-child {
line-height: 1.43;
padding-right: 30px;
vertical-align: top;
font-size: 13px;
width: 50%;
}
.ibox ::v-deep tr > td > span:last-child {
float: right;
}
.ibox ::v-deep tr > td > span:last-child {
float: right;
}
</style>