专题文章
时长:00:00更新时间:2020-11-27 19:43:13
使用vue cli创建一个webpack工程。加入vue-router然后使用路由引入一个新的组件。这时路由和链接是这样写的。const router = new VueRouter({ mode: ';history';.base: __dirname.routes: [ { path: ';/first';.component: firstCom } ]})。<;a href=";/first";rel=";external nofollow";>;Try this。<;/a>;。1、npm run dev查看没有问题。2、npm run build打包。
查看详情