2017-05-17 51 views
0

我期待從該文件的存取權限的新聞組件與路徑,但它不工作,我也用於= {...}但仍然無法正常工作。任何人都可以給任何類型的文檔提供一個良好的鏈接來解決它?路由器鏈路Vue的JS

感謝

data() { 
     return { 
      settings: [{ 
        title: "Profile" 
       }, { 
        title: "E-mail" 
       }, { 

        title: "News", path: "./News", 
       }, { 

        title: "Custom" 

       }, { 

        title: "Edit" 
       } 


      ] 
     } 
    } 
+0

你的意思是你想要得到的路線的URL路徑?或者你需要應用程序中的實際文件位置? – thanksd

回答

0

路由器應該設置這樣

export default new Router({ 
mode: 'hash', 
routes: [{ 
     path: '/', 
     component: Home 
    }, 
    { 
     path: '/login', 
     component: Login 
    } 
]}) 
+0

我已經在我的main.js文件中實現了組件的所有路由,但是我希望鏈接來自此文件的** News **組件。 – user3380738

+0

數據部分看起來很好,細節更多,看你如何使用它 – SaJed