标签:div amp react type 跳转 ram port 输出 rgba
?? 参考https://docs.taro.zone/docs/router
Taro.navigateTo({ url: ‘/pages/page/path/name?id=2&type=test‘ })
import { getCurrentInstance } from ‘@tarojs/taro‘ import React, { Component } from ‘react‘ export default class C extends Component { componentDidMount () { console.log(getCurrentInstance().router.params) // 输出 { id: 2, type: ‘test‘ } } }
taro3以下版本通常使用「this.$router.params.参数名」方法获取入参;
taro3开始需要使用「getCurrentInstance().router.params」才能获取到。
End------------------------
????????????????????????????????????
????????????????????????????????????
????????????????????????????????????
标签:div amp react type 跳转 ram port 输出 rgba
原文地址:https://www.cnblogs.com/MaiJiangDou/p/14756770.html