解決微信小程序Scroll-view組件flex佈局不生效

解決項目中碰到的一個問題:
Scroll-view組件flex佈局不生效

解決辦法:

設置scroll-view組件的enable-flex

<scroll-view scroll-x="true" class="category" enable-flex="true">
    <view wx:for="{{categoryData}}" wx:key="{{index}}" class="item">
      <text class="name">{{item.catalog}}</text>
      <text class="title">"{{item.title}}"</text>
      <image src="{{item.src}}"></image>
    </view>
  </scroll-view>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章