forked from github/dataease
fix(查询组件): 查询组件设置显示字段,编辑时提示信息不明确
This commit is contained in:
parent
0d2bdda853
commit
db12ffcee6
@ -1348,9 +1348,11 @@ defineExpose({
|
||||
</el-tree-select>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span class="label">查询字段</span>
|
||||
<el-select
|
||||
@change="handleFieldChange"
|
||||
placeholder="查询字段"
|
||||
class="search-field"
|
||||
v-model="curComponent.field.id"
|
||||
>
|
||||
<template v-if="curComponent.field.id" #prefix>
|
||||
@ -1394,7 +1396,12 @@ defineExpose({
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="value">
|
||||
<el-select placeholder="显示字段" v-model="curComponent.displayId">
|
||||
<span class="label">显示字段</span>
|
||||
<el-select
|
||||
placeholder="显示字段"
|
||||
class="search-field"
|
||||
v-model="curComponent.displayId"
|
||||
>
|
||||
<template v-if="curComponent.displayId" #prefix>
|
||||
<el-icon>
|
||||
<Icon
|
||||
@ -1440,6 +1447,7 @@ defineExpose({
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span class="label">排序字段</span>
|
||||
<el-select
|
||||
clearable
|
||||
placeholder="请选择排序字段"
|
||||
@ -2223,15 +2231,28 @@ defineExpose({
|
||||
}
|
||||
|
||||
.value {
|
||||
.ed-select {
|
||||
width: 321px;
|
||||
}
|
||||
width: 321px;
|
||||
.value {
|
||||
margin-top: 8px;
|
||||
&:first-child {
|
||||
margin-top: -0.5px;
|
||||
}
|
||||
}
|
||||
.ed-select {
|
||||
width: 321px;
|
||||
.search-field {
|
||||
width: 257px;
|
||||
}
|
||||
|
||||
.sort-field {
|
||||
width: 176px;
|
||||
}
|
||||
|
||||
.label {
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ const handleFieldIdChange = (val: EnumValue) => {
|
||||
const mapValue = setDefaultMapValue(
|
||||
Array.isArray(selectValue.value) ? [...selectValue.value] : [selectValue.value]
|
||||
)
|
||||
if (mapValue.length !== config.value.defaultMapValue.length) {
|
||||
if (mapValue?.length !== config.value.defaultMapValue?.length) {
|
||||
shouldReSearch = true
|
||||
} else if (!mapValue.every(value => config.value.defaultMapValue.includes(value))) {
|
||||
shouldReSearch = true
|
||||
|
Loading…
Reference in New Issue
Block a user