chore: 🔨 界面优化

[skip ci]
This commit is contained in:
tk
2025-03-26 15:39:05 +08:00
committed by nsnail
parent 20f09c8ea1
commit d4956c94e0
9 changed files with 21 additions and 17 deletions

View File

@ -4,7 +4,6 @@
:params="form"
:props="{ label: 'key', value: 'value' }"
:query-api="$API.sys_dic.pagedQueryContent"
:table-width="60"
clearable
ref="area">
<template #header>

View File

@ -2,8 +2,9 @@
<el-table-column :label="label" :prop="prop" sortable="custom">
<template #default="{ row }">
<div class="avatar">
<el-avatar :src="getAvatar(row, prop)" size="small"></el-avatar>
<span>{{ tool.getNestedProperty(row, prop) }}</span>
<el-avatar :src="getAvatar(row, prop, avatar)" size="small"></el-avatar>
<el-link v-if="this.click" @click="this.click(row)"> {{ tool.getNestedProperty(row, prop) }}</el-link>
<span v-else> {{ tool.getNestedProperty(row, prop) }}</span>
</div>
</template>
</el-table-column>
@ -22,6 +23,8 @@ export default {
props: {
label: { type: String },
prop: { type: String },
avatar: { type: String },
click: { type: Function },
},
data() {
return {}
@ -36,8 +39,12 @@ export default {
},
methods: {
//获取头像
getAvatar(row, prop) {
return row.avatar ? row.avatar : this.$CONFIG.DEFAULT_AVATAR(tool.getNestedProperty(row, prop))
getAvatar(row, prop, avatar) {
return avatar
? tool.getNestedProperty(row, avatar)
: row.avatar
? row.avatar
: this.$CONFIG.DEFAULT_AVATAR(tool.getNestedProperty(row, prop))
},
},
}

View File

@ -4,7 +4,6 @@
:params="form"
:props="{ label: 'userName', value: 'id' }"
:query-api="$API.sys_user.pagedQuery"
:table-width="60"
clearable
ref="user">
<template #header>

View File

@ -15,7 +15,7 @@
@visible-change="visibleChange"
ref="select">
<template #empty>
<div v-loading="loading" :style="{ width: tableWidth + 'rem' }" class="scTable-select__table">
<div v-loading="loading" class="scTable-select__table">
<div class="scTable-select__header">
<slot :form="formData" :submit="formSubmit" name="header"></slot>
</div>

View File

@ -326,7 +326,6 @@
}
.el-popper {
max-width: 90%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}