We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信小程序
小程序基础库: 2.17.0 使用框架: React
// @ts-ignore const Home: React.FC = (props: IProps) => { return <AtButton type="primary" onClick={() => { console.log('Taro', Taro) console.log('Taro.navigateTo', Taro.navigateTo)
Taro.navigateTo({ url: 'index', }) }}>navigateTo</AtButton>
使用Taro.navigateTo跳转到应用内的某个页面,报navigateTo is not a function
import { navigateTo } from '@tarojs/router' 方式引用,报window undefined
http://taro-docs.jd.com/taro/docs/apis/route/navigateTo 按照文档正常跳转
如描述,报错
Taro CLI 3.2.8 environment info: System: OS: macOS 11.4 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm npmPackages: @tarojs/cli: 3.2.10 => 3.2.10 @tarojs/components: 3.2.10 => 3.2.10 @tarojs/mini-runner: 3.2.10 => 3.2.10 @tarojs/react: 3.2.10 => 3.2.10 @tarojs/runtime: 3.2.10 => 3.2.10 @tarojs/taro: 3.2.10 => 3.2.10 @tarojs/webpack-runner: 3.2.10 => 3.2.10 babel-preset-taro: 3.2.10 => 3.2.10 eslint-config-taro: 3.2.10 => 3.2.10 react: ^17.0.0 => 17.0.2 taro-ui: ^3.0.0-alpha => 3.0.0-alpha.10
The text was updated successfully, but these errors were encountered:
import { navigateTo } from '@tarojs/router' 方式引用,报window.addEventListener is not a function
Sorry, something went wrong.
Taro CLI 和 Taro 依赖版本保持一致。
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.17.0
使用框架: React
复现步骤
// @ts-ignore
const Home: React.FC = (props: IProps) => {
return
<AtButton type="primary" onClick={() => {
console.log('Taro', Taro)
console.log('Taro.navigateTo', Taro.navigateTo)
使用Taro.navigateTo跳转到应用内的某个页面,报navigateTo is not a function
import { navigateTo } from '@tarojs/router' 方式引用,报window undefined
期望结果
http://taro-docs.jd.com/taro/docs/apis/route/navigateTo
按照文档正常跳转
实际结果
如描述,报错
环境信息
The text was updated successfully, but these errors were encountered: