Comments (5)
问题描述过于笼统 为什么不行? 具体变现在? history模式下是单针对华为还是其他安卓都是? 提问题的时候能不能详细点 如果你是作者 你会是怎么样的感受 这种其实我可以无视并关闭的
from uni-simple-router.
还好你没有无视关闭,那都默默放弃了。。你知道耽误多少时间吗?你知道uni-simple-router把空query {}打进URL会影响微信JS签名吗?
router最核心的就是处理URL及其参数,encode/decode, parse/stringify
useUniConfig: true 结果还是需要routes配置
from uni-simple-router.
看起来 你好像没搞明白 useUniConfig: true
的含义, 他的作用是页面样式包括组件 都会是采用pages.json中的配置。这样就是完全使用uni-app开发模式!而你改为false 就表明着你不会采用uni-app配置开发 所有页面都会去除样式及组件、生命周期。并不是说不需要配置 routes
项。 对于你说的参数问题,在不同的模式下 url表现不同 模式不兼容则去除掉参数。所以如果你在微信公众号开发 你应该配置 encodeURI:false
from uni-simple-router.
根本不需要encodeURI: false这样的配置项。router需要确保出去的所有URL都是URL安全的:
- 对于所出去的URL,可以保持简单形式,例如?a=1&b=2;
- 同时,router作为强大的存在当然自动支持JSON复杂URL参数,此时所出去的也仍然是URL安全即经过encodeURIComponent的;
- 短链接兴起自有其原因,微信BUG般存在对动态URL进行签名,这就对router的URL参数处理提出了更高的要求。
综上,对于最好用的router来说,所面临的核心问题肯定是快速搞定浏览器环境的要求,哪怕是微信BUG般存在。所以encodeURL: false这样的配置项其实有点生造而略显多余
from uni-simple-router.
作为开发人员你应该时刻明白不是所有人都能按照编写并传递严格的json格式 所以会提供这个的配置给开发者自行断言 当模式与传递的参数不匹配时,参数被裁掉。开发者心里是明白的!适用的人群不同 暂时只能用这种方式处理
1.如果你是来解决问题的,那么请明确你的问题。
2.如果你是来提出改进或批评的,你可以选择pr,每个issue及pr我都会认真处理
from uni-simple-router.
Related Issues (20)
- 完全使用vue-router开发模式下,组件内调用uni.createSelectorQuery()方法报错 HOT 2
- Vue3+Vite支持 HOT 4
- h5项目,路由模式为history,页面跳转正常,但地址栏不再有任何变化,并且控制台报了一个错误 HOT 5
- 网站无法访问 HOT 1
- url传参“/?a=value&b=value2”如果以“&”结尾,路由报错 HOT 1
- web-view不能跳转 HOT 1
- 小程序点击回到首页按钮不触发beforeEach守卫 HOT 1
- 能支持vue3 吗 HOT 4
- 关于支持 vue3 及 vite 的可用版本 HOT 6
- vue3
- H5没有上级页面时,点击导航栏的返回,返回拦截不起作用 HOT 1
- 快手小程序无法正常跳转 HOT 2
- 第三方H5回退会触发 uni-app afterEach HOT 2
- 使用自定义custom-tab-bar 路由监听不到 HOT 3
- h5配置aliasPath无法重定向路由 HOT 1
- uniapp 回退到上一个页面偶现当前页面无法释放 HOT 3
- app端在全局路由前置守卫使用uni.navigateTo不生效 HOT 1
- 循环调用 notRouteTo404 和 navjump HOT 1
- 使用路由守卫功能,点击返回,标题显示错误 HOT 2
- 希望支持快手小程序 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uni-simple-router.