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

taro & Block

taro & Block

https://nervjs.github.io/taro/docs/children.html#注意事项-1


import Taro, {
  Component,
  Events,
} from '@tarojs/taro'
import {
  View,
  Text,
  ScrollView,
  Block,
} from '@tarojs/components'


  render() {
    let { pages } = this.state
    return (
      <ScrollView className="list-wrap" scrollY scroll-with-animation lowerThreshold={120}
        onScrollToLower={this.fetchData.bind(this, true)}
      >
        {
          pages.map((page, pageIndex) => {
            return (
              <Block taroKey={pageIndex}>
                {
                  page.map(item => {
                    return (
                      <ActivityItem detail={item} key={item.id} />
                    )
                  })
                }
              </Block>
            )
          })
        }
      </ScrollView>
    )
  }


posted @ 2020-03-29 23:13  xgqfrms  阅读(677)  评论(1编辑  收藏  举报