当前位置:网站首页>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边栏推荐
猜你喜欢
随机推荐
Oracle 19c 单实例 19.3.0 升级到19.11.0 详细教程
A discussion of integrated circuits
Why is Luo Zhenyu's A-share dream so difficult to fulfill?
一分钟认识 IndexedDB 数据库,太强大了!
A Collection of Flutter Tutorials (2022 Edition)
封装、继承、多态的联合使用实现不同等级学生分数信息的统计
【VSCode】一文详解vscode下安装vim后无法使用Ctrl+CV复制粘贴 使用Vim插件的配置记录
MySQL性能指标TPS\QPS\IOPS如何压测?
从零开始配置 vim(6)——缩写
LeetCode_424_替换后的最长重复字符
router---编程式导航
做项目管理有且有必要了解并学习的重要知识--PMP项目管理
未来已来,只是尚未流行
情人节浪漫3D照片墙【附源码】
【牛客刷题-SQL大厂面试真题】NO5.某宝店铺分析(电商模式)
【WeChat Mini Program】Social Internship Production Project for Information Management and Information System Major--Trash Fingerprint
npm install出现的各种问题
Programmer Qixi Gift - How to quickly build an exclusive chat room for your girlfriend in 30 minutes
ES 节点2G内存分析
redisTemplate存取List遇到的坑









