<!--index.wxml-->
<view class="MainPage">
  <view class="textarea">
    <textarea placeholder="请输入评论" bindinput="FormInput" data-name="Comment"></textarea>
  </view>
  <view class="photos">
    <view class="flex-h">
      <view class="flex-item">
        <view class="item" wx:for="{{FormData.ImgList}}" wx:for-index="idx" wx:for-item="item" wx:key="key">
          <image mode="aspectFit" src="{{item}}" class="centerLabel contain"></image>
          <text data-index="{{idx}}" bindtap="DeleteItem"></text>
        </view>
        <view class="addBtn" wx:if="{{FormData.ImgList.length < 4}}" bindtap="AddImage">
          <view class="centerLabel">
            <image mode="widthFix" src="/assets/images/icon35.png"></image>
            <text>相机/相册</text>
          </view>
        </view>
      </view>
      <text>可选4张</text>
    </view>
  </view>
  <view class="btn">
    <text bindtap="SubmitForm">发布</text>
  </view>
</view>