<!--packageF/storeManagement/components/baseInfo_popup/goods_details_pop/goods_details_pop.wxml-->

<van-popup show="{{show}}" position="bottom" overlay="{{false}}" safe-area-inset-bottom="{{false}}" >
  <view class="wrapper">
    <view class="header">
      <van-nav-bar
        title="商品详情"
        bind:click-left="onClickLeft"
      >
      <text slot="left" style="color:#838383;" bindtap="showPopup">取消</text>
      </van-nav-bar>
    </view>

    <view class="container">
      <view class="content-list">
          <view wx:for="{{contentList}}" wx:for-item="content" class="editor-item" wx:key="index" :tabindex="index" bindtap="handleClick(index, content)">
              <textarea class="textarea" placeholder="给商品添加介绍吧~" bindinput="changeText" value="{{content.value}}" data-index="{{index}}" auto-height wx:if="{{content.type === 'text'}}"></textarea>
              <image wx:if="{{content.type === 'image'}}" mode="widthFix" src="{{content.value}}" />
              <view class="editor-item-ops">
                <view class="ops-btn btn-arrow-down" wx:if="{{contentList.length > 1 && index !== contentList.length - 1}}" data-index="{{index}}" bindtap="moveDown">下移</view>
                <view class="ops-btn btn-arrow-up" wx:if="{{contentList.length > 1 && index !== 0}}" data-index="{{index}}" bindtap="moveUp">上移</view>
                <view class="ops-btn btn-add" data-index="{{index}}" bindtap="inserOne">添加</view>
                <view class="ops-btn btn-delete" data-index="{{index}}" bindtap="delOne">删除</view>
              </view>
          </view>
        </view>
    </view>

    <view class="footer">
      <view class="right">
        <i class="iconfont icon-customform_list_3" bindtap="choineImage"></i>
        <i class="iconfont icon-ht_textstyle_blod editor-btn" bindtap="addAtLast"></i>
      </view>
      <view class="save-btn" bindtap="saveEdit">保存</view>
    </view>

  </view>
</van-popup>