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):// 路径新窗口打开 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 = '' @@ -98,6 +103,9 @@ res.push(data) } } if (r.query) { data.query = r.query } // recursive child routes if (r.children) {