![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue-router
前端酱紫
这个作者很懒,什么都没留下…
展开
-
vue3.0 中使用vuex 和 vue-router4
目录结构:|-- studyVue3 |-- .gitignore |-- directoryList.md |-- index.html |-- package.json |-- public | |-- favicon.ico |-- src |-- App.vue |-- index.css |-- main.js |-- assets | |-- logo原创 2021-08-11 16:24:36 · 143 阅读 · 0 评论 -
vue3 router Cannot use ‘in‘ operator to search for ‘path‘ in undefined
创建vue3,安装使用 router后 发现报错:Cannot use ‘in’ operator to search for ‘path’ in undefined代码如下:import { createRouter, createWebHashHistory } from 'vue-router';import Home from '../views/Home.vue';const router = createRouter({ history: createWebHashHist原创 2021-08-11 14:34:55 · 12325 阅读 · 6 评论 -
vue-router 去掉hash
vue-router使用在地址栏端口后面会带上一个‘#’ 号,不太友好,那怎么去除呢?在router.js 里面的 new VueRouter 里面 加 mode:'history' 就可以去掉‘#’ 号了加上 mode:'history' 号之后 ‘#’ 号就消失了。...原创 2020-06-06 22:54:20 · 1512 阅读 · 0 评论