taro中怎么使用weui呢?
https://github.com/geekape/taro-weui
这个文档也没说清楚咋用,我yarn add taro-weui 提示找不到这个库。。?
1
1246935943_m
@1246935943_m
0
声望
5
帖子
2932
资料浏览
1
粉丝
2
关注
1246935943_m 发布的帖子
-
taro中怎么使用weui呢
-
RE: 我按照Taro官方教程使用Echart但是,界面没有内容,且报echarts找不到,但是通过检查元素可以发展有ec-canvas这个标签
研究了两天终于搞定了,官方的那个echart示例真的好坑啊,直接上我调试正常的代码:
import * as echarts from '../../common/ec-canvas/echarts.js'; const optionDta = {...}; class MainPage extends Component { state = { ec: {lazyLoad: true} } componentDidMount() { this.refs['mychart-dom-area'].init((canvas, width, height) => { // 初始化图表 const chart = echarts.init(canvas, null, { width: width, height: height }); chart.setOption(option); // 注意这里一定要返回 chart 实例,否则会影响事件处理等 return chart; }) } render () { <View> <ec-canvas id='mychart-dom-area' canvas-id='mychart-area' ref='mychart-dom-area' ec={ec} /> </View> } }
-
我按照Taro官方教程使用Echart但是,界面没有内容,且报echarts找不到,但是通过检查元素可以发展有ec-canvas这个标签
我按照Taro官方教程使用Echart但是,界面没有内容,且报echarts找不到,但是通过检查元素可以发展有ec-canvas这个标签
-
RE: 我用的taro-echarts,饼图的tooltip点击的时候,饼图会出错,如下图,请问怎么解决呢?
兄弟 你这问题解决没,我根据http://npm.taobao.org/package/taro-echarts这个配置操作,报了找不到ec-canvas
-
为什么这种组合情况下,通过renderFn传入的jsx元素不能绑定这个onClickBlock事件呢?
为什么这种组合情况下,不能绑定这个onClickBlock事件呢?
代码如下:class Dialog extends Component { render () { return ( <View className='dialog'> <View className='header'> {this.props.renderHeader} </View> <View className='body'> {this.props.children} </View> <View className='footer'> {this.props.renderFooter} </View> </View> ) } } class App extends Component { render () { return ( <View className='container'> <Dialog renderHeader={ <View className='welcome-message' onClick={this.onClickBlock}>Welcome!</View> } renderFooter={ <Button className='close'>Close</Button> } > <View className="dialog-message"> Thank you for using Taro. </View> </Dialog> </View> ) } }