.wrap{ word-break: break-all; word-wrap:break-word; white-space:pre-line; }
// taro 为例 import Taro, { Component, Config } from '@tarojs/taro'; export default class HomePage extends Component { config: Config = { navigationBarTitleText: '首页', disableScroll: true, // 这一句 }; }
container.js
import Child from 'child'; render(){ return <View> <Child onToggle={this.handleToggle.bind(this)}/> </View> }
child.js
handleClick(){ this.props.onToggle(); } render(){ return <View onClick={this.handleClick.bind(this)}>点击测试</View> }
state = { scale : 10 } resetScale(){ this.setState({ scale:this.state.scale===10?10.00001:10 }) } render(){ return ( <Map scale={this.state.scale}/> ) }
Taro.getLocation({ type:'gcj02' // 这里 }) .then(res=>{ let { longitude, latitude } = res; })
推荐教程:《微信小程序》
以上就是微信小程序常见的开发问题汇总的详细内容,更多请关注php中文网其它相关文章!
微信是一款手机通信软件,支持通过手机网络发送语音短信、视频、图片和文字。微信可以单聊及群聊,还能根据地理位置找到附近的人,带给大家全新的移动沟通体验,有需要的小伙伴快来保存下载体验吧!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号