Taro 开发踩坑指南 (小程序,H5, RN)
Taro 开发踩坑指南 (小程序,H5, RN)
css
- taro 如何展示多行文本省略号
https://www.cnblogs.com/xgqfrms/p/12569057.html
- UI 设计稿尺寸 375px * 2 === 750px (iphone 6)
https://www.cnblogs.com/xgqfrms/protected/p/12568792.html
js
- taro 绑定事件
https://nervjs.github.io/taro/docs/event.html
constructor () {
super(...arguments)
this.state = {
current: 0,
isOpened: false,
}
// this.bookTicketNow.bind(this);
this.bookTicketNow = this.bookTicketNow.bind(this);
}
bookTicketNow (e) {
log(`e`, e);
log(`e.target`, e.target);
}
<Button
onClick={this.bookTicketNow}
className="ticket-card-btn">立即预定</Button>
- defaultProps
https://taro-docs.jd.com/taro/docs/apis/about/tarocomponent.html#defaultprops
class CustomButton extends React.Component {
// ...
}
CustomButton.defaultProps = {
color: 'blue'
}
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/12577274.html
未经授权禁止转载,违者必究!