有两种类型:在原文件夹中添加页面和创建新文件夹以及在该文件夹中创建新页面。1.在原有文件夹下新建一个页面:比如在product文件夹下新建一个productguaranteeservice页面productGuarantee①首先在views目录下product文件夹下新建文件夹productGuarantee,然后新建index.vue文件在这个文件夹下②然后找到router文件夹下moudles下的product.js文件,在文件下添加你新添加的页面的链接和页面地址{path:'guarantee',name:'ProductGuarantee',meta:{title:'guaranteeservice',noCache:true},component:()=>import('@/views/product/productGuarantee/index.vue')}③在浏览器中访问:http://localhost:9528/admin/p...在views下新建一个文件夹,并添加一个新的页面,比如现在在views下添加一个station文件夹①首先在views下新建一个station文件夹,在station下新建notice文件夹和Index.vue文件②然后在router文件夹下的moudles文件夹下新建station.js,声明stationRouter然后exportimportLayoutfrom'@/layout'import{roterPre}from'@/settings'conststationRouter={path:`${roterPre}/station`,name:'station',meta:{icon:'',title:'通知列表'},alwaysShow:true,component:Layout,children:[{path:'notice',name:'stationNotice',meta:{title:'NoticeList'},component:()=>导入('@/views/站/通知/索引')}]}exportdefaultstationRouter③在router文件夹下的Index.js中导入④访问页面:http://localhost:9528/admin/s...如果您觉得这篇文章对您有用,请给我们开源项目一点star:http://github.crmeb.net/u/defu非常感谢!
