fix: MML回车undefined问题,关闭搜索匹配

This commit is contained in:
TsMask
2025-10-11 17:28:05 +08:00
parent 97e5533d6e
commit f4e61a0ebc
2 changed files with 2 additions and 0 deletions

View File

@@ -442,6 +442,7 @@ function fnGetList() {
/**自动完成搜索匹配前缀 */ /**自动完成搜索匹配前缀 */
function fnAutoCompleteSearch(value: string) { function fnAutoCompleteSearch(value: string) {
state.autoCompleteSearch = []; state.autoCompleteSearch = [];
return; // 回车undefined问题关闭搜索匹配
for (const item of state.autoCompleteData) { for (const item of state.autoCompleteData) {
const filterOptions = item.options.filter((s: any) => { const filterOptions = item.options.filter((s: any) => {
return `${s.operation} ${s.object}`.indexOf(value.toLowerCase()) >= 0; return `${s.operation} ${s.object}`.indexOf(value.toLowerCase()) >= 0;

View File

@@ -408,6 +408,7 @@ function fnGetList() {
/**自动完成搜索匹配前缀 */ /**自动完成搜索匹配前缀 */
function fnAutoCompleteSearch(value: string) { function fnAutoCompleteSearch(value: string) {
state.autoCompleteSearch = []; state.autoCompleteSearch = [];
return; // 回车undefined问题关闭搜索匹配
for (const item of state.autoCompleteData) { for (const item of state.autoCompleteData) {
const filterOptions = item.options.filter((s: any) => { const filterOptions = item.options.filter((s: any) => {
return `${s.operation} ${s.object}`.indexOf(value.toLowerCase()) >= 0; return `${s.operation} ${s.object}`.indexOf(value.toLowerCase()) >= 0;