v2=> npm install vue-router@3 v3 => npm install vue-router(vue-router@4)
router => index.ts(js)
main.ts页面 引入:import router from './router' 使用:use(router)
1.在views文件夹内穿件页面 2.在路由也配置: a.引入路由创建方法:createHistory
to:path/name
1.接收参数字段不同 2.动态跳转时 对象写法 params只能使用name跳转 query则都可以
hash和history 区别: