From d02ba57ffb93b34f54512db23a61db4f9b607a99 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期五, 27 九月 2024 16:02:40 +0800 Subject: [PATCH] 修复代码生成上级菜单显示问题 --- src/components/HeaderSearch/index.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue index 89acd33..e4c06a0 100644 --- a/src/components/HeaderSearch/index.vue +++ b/src/components/HeaderSearch/index.vue @@ -45,12 +45,17 @@ } function change(val) { const path = val.path; + const query = val.query; if (isHttp(path)) { // http(s):// 璺緞鏂扮獥鍙f墦寮� const pindex = path.indexOf("http"); window.open(path.substr(pindex, path.length), "_blank"); } else { - router.push(path) + if (query) { + router.push({ path: path, query: JSON.parse(query) }); + } else { + router.push(path) + } } search.value = '' @@ -65,7 +70,6 @@ threshold: 0.4, location: 0, distance: 100, - maxPatternLength: 32, minMatchCharLength: 1, keys: [{ name: 'title', @@ -99,6 +103,9 @@ res.push(data) } } + if (r.query) { + data.query = r.query + } // recursive child routes if (r.children) { -- Gitblit v1.9.3