Comments (8)
支持在 vue3 中使用的,我添加了一个 vue3 中使用的示例,你可以参考下
https://github.com/lblblong/tarojs-router-next/tree/master/examples/vue3
from tarojs-router-next.
我能加您个微信吗, 不知道是不是我的使用方式有问题 依旧还是没有起效果
from tarojs-router-next.
你这个报错可能是因为 react 和 React DOM 版本不匹配,你更新 react-dom 的版本到最新的试试
from tarojs-router-next.
这是父页面, 此时我需要跳转至子页面并传入一个'content'的值
此时子页面获取数据
from tarojs-router-next.
这是父页面 此时跳转至子页面并传入一个'content'的值, 跳转是可以进行跳转的
然后再在子页面获取数据
最后打印的结果为undefined
from tarojs-router-next.
这是父页面 此时跳转至子页面并传入一个'content'的值, 跳转是可以进行跳转的
然后再在子页面获取数据
最后打印的结果为undefined
你传过去的是 params,Router.getData 是获取不到的,参考以下获取方法
import { getCurrentInstance } from '@tarojs/taro'
onLoad () {
const params = getCurrentInstance().router?.params,
}
如果在onLoad生命周期像这样也拿不到参数,可以换到 onShow 生命周期去拿参数试试看
from tarojs-router-next.
谢啦大兄弟, 通过你这种方式可以获取到, 而且你最新更新的useRouterVue不错
from tarojs-router-next.
嗯,通过 useRouterVue 拿参数会更好些
from tarojs-router-next.
Related Issues (20)
- Router.to*方法问题 HOT 15
- 定义附加数据问题 HOT 1
- build:weapp 白屏
- build:weapp 白屏 HOT 21
- 真的是一个好库 HOT 5
- taro升级3.6拉 HOT 3
- 老板,Taro 3.6.6无法跳转 HOT 2
- 3.6.8 没有生成路由 HOT 1
- taro3.6.6 开发环境没问题,生产编译生成不了分包路由,都按文档配了插件不行,老板什么原因?警告 请为分包 subpageA 配置 name 字段, HOT 5
- 路由调转传递data没有类型提示 HOT 5
- Vue3使用to***中的switchTab时,有警告提示wx.switchTab: url 不支持 queryString HOT 1
- 【建议】toXXX()的返回类型,参照Params和Data一样,使用在toute.config.ts中定义的BackData类型 HOT 7
- 页面重复跳转
- taro react使用的时候分包情况会生成一个冗余的路由 HOT 2
- 页面A,页面B,页面C,希望是在页面C调用back,传参xxx,返回页面A,然后页面A接收到xxx HOT 1
- 你好,不使用to函数,使用navigate是不是不会读取route.config.ts了? HOT 1
- 后退路由拦截器,不会保留to的exp HOT 1
- 当使用reLaunch类型的跳转时,会错误的触发 registerRouterBackListener 后退拦截器回调 HOT 2
- 路由已经生成,控制台提示生成,源码也生成,但是提示不存在函数 HOT 2
- 路由方法没有实际生成 HOT 3
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 tarojs-router-next.