当前位置:网站首页>router---mode
router---mode
2022-08-04 13:03:00 【monstkl】
One, hash mode
The default mode is hash modePrinciple: window.onhashchange eventIt is not the real page address, but is passed to the single-page file in the form of parameters. Just make sure that the file path of index.html is real.Second, history mode
new Router({mode: 'history',routes: []})Principle: window.history.pushState completes URL jumping, this mode requires back-end support, because custom paths such as http://xxx/ are not available in single-page applicationsBack-end support mode 1:The server needs to add candidate resources for all cases so that they all return the same index.html fileBack-end support mode 2:Add a simple fallback route on the server, if the URL does not match any static resources, serve the index.html file边栏推荐
猜你喜欢
随机推荐
并发刺客(False Sharing)——并发程序的隐藏杀手
Geoffrey Hinton:深度学习的下一个大事件
CReFF缓解长尾数据联邦学习(IJCAI 2022)
1314元的七夕礼盒,收割了多少直男?
A comprehensive understanding of MOS tubes, an article is enough
ReentrantLock 原理
永磁同步电机FOC驱动代码讲解
【微信小程序】信息管理与信息系统专业社会实习制作项目--垃圾指纹
用过Apifox这个API接口工具后,确实感觉postman有点鸡肋......
项目里的各种配置,你都了解吗?
MySQL性能指标TPS\QPS\IOPS如何压测?
DateTimeFormatter api
新 Nsight Graph、Nsight Aftermath 版本中的性能提升和增强功能
【水一个徽章】
Two years of independent development experience Programmers tell us the experience of making money (listen to the masters who really make money)
抽奖/秒杀/竞价/评分/权威/投票,技术教你用合适的方法做好活动
年轻人为什么不喜欢买蒙牛、伊利了?
未来已来,只是尚未流行
c#学习_第二弹
npm install出现的各种问题









