vue多頁面路由跳轉問題

2021-10-23 06:29:16 字數 369 閱讀 1668

頁面a的執行位址是 http://localhost:8080/a.html#/        a是列表頁

頁面 b的執行位址是http://localhost:8080/b.html#/110    b是從列表頁進入的詳情頁

如果在a頁面裡面寫@click=$router.push()

不管是這樣寫還是@click=$router.push()

出來的效果都是 http://localhost:8080/a.html#/b.html#/110

而想要的效果不需要a.html#/的

經驗證用a鏈結在外層包裹一下,然後寫href,

:href = ". '/b.html#/' + item.aa "

可以!

vue路由跳轉頁面

1.不帶引數 1 2 name,path都行,建議用name 3 42.帶引數5 6 params傳引數 類似post 7 路由配置 path home id 或者 path home id 8 不配置path 第一次可請求,重新整理頁面id會消失9 配置path,重新整理頁面id會保留 10 ht...

Vue路由實現頁面跳轉

在程式 中重新新增乙個log.vue檔案,用來顯示日誌資訊,這時就用到了頁面跳轉。vue檔案之間的跳轉,需要在router裡面配置path,通過路徑跳轉 html檔案如下 to class log btn 日誌router link 在router.js中配置,其中 components pages...

vue路由以及頁面跳轉的使用

import vue from vue import router from vue router import helloworld from components helloworld import child from components child vue.use router expor...