xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Taro 开发踩坑指南 (小程序,H5, RN)

Taro 开发踩坑指南 (小程序,H5, RN)

css

  1. taro 如何展示多行文本省略号

https://www.cnblogs.com/xgqfrms/p/12569057.html

  1. UI 设计稿尺寸 375px * 2 === 750px (iphone 6)

https://www.cnblogs.com/xgqfrms/protected/p/12568792.html

js

  1. 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>

  1. 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 发布文章使用:只允许注册用户才可以访问!


posted @ 2020-03-26 20:53  xgqfrms  阅读(872)  评论(7编辑  收藏  举报