Browse Source

Merge branch 'feature/v2.4.17_wky' of group3/qmx_page_admin into feature/v2.4.17

wangkaiyue 2 years ago
parent
commit
26c7a4b6f9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/views/outServer/outServer.vue

+ 8 - 1
src/views/outServer/outServer.vue

@@ -5,7 +5,6 @@
 </template>
 <script>
 import qs from 'qs'
-
 export default {
   name: 'iframe',
   data: function () {
@@ -16,6 +15,14 @@ export default {
   created() {
     this.getUrlLink()
   },
+  watch: {
+    '$route' (to, from) {
+      // to 表示新的路由对象
+      // from 表示旧的路由对象
+      // console.log(`路由地址由 ${from.path} 变为 ${to.path}`);
+      this.getUrlLink()
+    }
+  },
   methods: {
     getUrlLink() {
       let newParam = this.$route.query