Ver Fonte

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

terry há 3 meses atrás
pai
commit
6faee5e445

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

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