在这里我将会介绍vue-router的两种模式,模式修改方法,以及两种模式的区别
1、vue-router的两种模式
vue-router的模式有两种,分别为hash模式和history 模式。
1)hash模式(默认的)
const router = new VueRouter({
mode: 'hash', // 配不配置都可以,默认是hash模式
//路由规则
routes:[
{
path:<
在这里我将会介绍vue-router的两种模式,模式修改方法,以及两种模式的区别
1、vue-router的两种模式
vue-router的模式有两种,分别为hash模式和history 模式。
1)hash模式(默认的)
const router = new VueRouter({
mode: 'hash', // 配不配置都可以,默认是hash模式
//路由规则
routes:[
{
path:<