vue-router路由中 this.$router 與this.$route區別

his. r o u t e r 與 t h i s . router與this. router與this.route 兩者相差 一個 r 但是差距蠻大的 一開始沒注意這些 細節 數據沒獲取到 也沒有報錯 嫩是 耽誤了一會時間 尋找 this.$router 實際上 就是全局 路由對象 任何頁面 都可以 調用 push (), go()等方法 this.$route 表示當前正在用於跳轉的路由器對
相關文章
相關標籤/搜索