先上代碼代碼大概就是這樣,想通過vue-router判斷不同路徑在router-view中渲染不同內容,但是像上面這么寫會報錯:[Vue warn]: Property or method "items" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. (found in anonymous component - use the "name" option for better debugging messages.)不太清楚這個問題是什么意思,希望大神們給點解決辦法,或者用其他路由方法也可以 只要跳轉時不重復刷新頁面就好。還有個問題就是,vue-router 的history模式 說是需要后端配置否則會404 我按照官網的寫法用node中間件把跳轉路徑都重新定向到當前頁面了,雖然跳轉是解決了,但是每次跳轉都重新載入頁面并不是局部刷新了 有什么解決辦法嗎?
vue 在template 寫 v-for 問題
繁星點點滴滴
2018-09-04 13:25:37