lblblong / tarojs-router-next

Taro 小程序路由库/自动生成带参数类型提示的路由方法/允许传递任意类型、任意大小的参数数据/同步的路由方法调用/koa体验一致的路由中间件
https://lblblong.github.io/tarojs-router-next/
MIT License
248 stars 23 forks source link

定义附加数据问题 #59

Closed LrainchenL closed 1 year ago

LrainchenL commented 1 year ago

router image image image image image app.js image pages image image 在这样的页面配置下,使用Router.to*方法中间件的校验部分就不执行,而使用Router.navigate({ url: '/pages/archives/index', ext: { mustLogin: true } })就可以,不知道是不是有哪里配置错误,一直没有找到问题 Router.toArchives()只返回这个 image Router.navigate方法就可以正常执行 image

lblblong commented 1 year ago

页面下的路由配置文件不支持 .js,只支持 .ts,把 route.config.js 改成 route.config.ts 就行了