commit
25d3404c9c
@ -71,7 +71,9 @@ watch(show, async val => {
|
|||||||
|
|
||||||
/** 查询 */
|
/** 查询 */
|
||||||
function search() {
|
function search() {
|
||||||
resultOptions.value = menusList.filter(menu => keyword.value && menu.meta?.title.includes(keyword.value.trim()));
|
resultOptions.value = menusList.filter(
|
||||||
|
menu => keyword.value && menu.meta?.title.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase().trim())
|
||||||
|
);
|
||||||
if (resultOptions.value?.length > 0) {
|
if (resultOptions.value?.length > 0) {
|
||||||
activePath.value = resultOptions.value[0].path;
|
activePath.value = resultOptions.value[0].path;
|
||||||
} else {
|
} else {
|
||||||
@ -80,9 +82,12 @@ function search() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
resultOptions.value = [];
|
|
||||||
keyword.value = '';
|
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
/** 延时处理防止用户看到某些操作 */
|
||||||
|
setTimeout(() => {
|
||||||
|
resultOptions.value = [];
|
||||||
|
keyword.value = '';
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** key up */
|
/** key up */
|
||||||
|
Loading…
Reference in New Issue
Block a user