From 341e3be3a989075bd81cdc57ff6a385bf2635bf6 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 29 十月 2024 16:34:56 +0800
Subject: [PATCH] 优化字典数组条件判断

---
 src/components/HeaderSearch/index.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/components/HeaderSearch/index.vue b/src/components/HeaderSearch/index.vue
index 7451037..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 = ''
@@ -98,6 +103,9 @@
         res.push(data)
       }
     }
+    if (r.query) {
+      data.query = r.query
+    }
 
     // recursive child routes
     if (r.children) {

--
Gitblit v1.9.3