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.23.0 使用框架: React
import { Component } from 'react' import Taro from '@tarojs/taro'; import { View, Text, Map } from '@tarojs/components' import { AtButton } from 'taro-ui' import "taro-ui/dist/style/components/button.scss" // 按需引入 import './index.scss' interface IProps { } interface IState { latitude: number; longitude: number; } export default class Index extends Component <IProps, IState> { constructor(props) { super(props); this.state = { latitude: 39.72684, longitude: 116.34159 }; } componentWillMount () { } componentDidMount () { } componentWillUnmount () { } componentDidShow () { } componentDidHide () { } onRegionChange = (e) => { console.log(e) } render () { const { latitude, longitude } = this.state; return ( <View className='index'> <Map id='myMap' scale={16} longitude={longitude} latitude={latitude} enableScroll={true} onRegionChange={this.onRegionChange} style="width: 100%; height: 500px;"> </Map> </View> ) } }
Map组件的onRegionChange事件正常使用
VM244 WAService.js:2 TypeError: this.l[(n.type false)] is not a function 报错导致onRegionChange不能正常工作
Taro CLI 3.4.3 environment info: System: OS: macOS 10.15.7 Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.10.0 - ~/.nvm/versions/node/v14.10.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v14.10.0/bin/yarn npm: 6.14.8 - ~/.nvm/versions/node/v14.10.0/bin/npm npmPackages: @tarojs/cli: 3.4.3 => 3.4.3 @tarojs/components: 3.4.3 => 3.4.3 @tarojs/mini-runner: 3.4.3 => 3.4.3 @tarojs/runtime: 3.4.3 => 3.4.3 @tarojs/taro: 3.4.3 => 3.4.3 @tarojs/webpack-runner: 3.4.3 => 3.4.3 babel-preset-taro: 3.4.3 => 3.4.3 eslint-config-taro: 3.4.3 => 3.4.3 taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.10
The text was updated successfully, but these errors were encountered:
等待热心的小伙伴解决问题中..., 有一些相关的 issues 可能帮助到你!
Thank you so much!
Sorry, something went wrong.
fix(react): 修复 preact 地图组件 onRegionChange 事件报错的问题,fix #11462
b42b656
686d168
Successfully merging a pull request may close this issue.
相关平台
微信小程序
小程序基础库: 2.23.0
使用框架: React
复现步骤
期望结果
Map组件的onRegionChange事件正常使用
实际结果
VM244 WAService.js:2 TypeError: this.l[(n.type false)] is not a function
报错导致onRegionChange不能正常工作
环境信息
The text was updated successfully, but these errors were encountered: