使用this.$router.push打開新頁面,路由傳參
this.$route.query
# 兩種方式皆可
1 | let pushRouter = this.$router.resolve( |
1 | let pushRouter = this.$router.resolve({ |
# 查詢完整網址
1 | window.location.href; |
# 查詢路徑
1 | this.$route.path; |
# 查詢query
1 | this.$route.query; |
# 會在url
中帶引數
路由頁面跳轉,重新整理過後,資料依然存在
1 | // ex: |
this.$route.params
1 | this.$router.resolve({ |
# 查詢params
1 | this.$route.params.id; |
# 不會在url
中帶引數
路由頁面跳轉,重新整理過後,資料及不存在