下拉框优化

This commit is contained in:
JenniferW 2025-12-22 10:26:00 +08:00
parent 01b64ea54a
commit 0c7f19c33f
1 changed files with 17 additions and 7 deletions

View File

@ -1458,8 +1458,15 @@ const fetchSearchHints = async (keyword) => {
};
}
// 3
// 3
// allValues fieldValue
if (!condition.field && condition.value && !condition.fieldLabel) {
const isValueFromSuggestion = allValues.value.some(
(item) => String(item.value) === String(condition.value)
);
if (isValueFromSuggestion) {
// fieldValue
return {
fieldName: "",
fieldValue: condition.value,
@ -1467,8 +1474,11 @@ const fetchSearchHints = async (keyword) => {
queryType: "FUZZY",
};
}
// 4 keyword
}
// 4
// fieldLabel field keyword
const keyword = condition.fieldLabel
? `${condition.fieldLabel}:${condition.value}`.replace(/:$/, "")
: condition.value;