فهرست منبع

fix: 切換身分時,帶上 query 參數

terry 3 ماه پیش
والد
کامیت
6faee5e445
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      TEAMModelOS/ClientApp/src/components/hiTeachSideMenu/navbar/IdentityNavbar.vue

+ 10 - 2
TEAMModelOS/ClientApp/src/components/hiTeachSideMenu/navbar/IdentityNavbar.vue

@@ -17,11 +17,19 @@ export default {
         },
         },
         navigateToSchool() {
         navigateToSchool() {
             const path = this.$route.path.replace('private', 'school');
             const path = this.$route.path.replace('private', 'school');
-            this.$router.push(path);
+            const query = this.$route.query;
+            this.$router.push({
+                path,
+                query
+            });
         },
         },
         navigateToPrivate() {
         navigateToPrivate() {
             const path = this.$route.path.replace('school', 'private');
             const path = this.$route.path.replace('school', 'private');
-            this.$router.push(path);
+            const query = this.$route.query;
+            this.$router.push({
+                path,
+                query
+            });
         }
         }
     },
     },
 }
 }