index.wxml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <cu-custom bgColor="bg-gradual-blue" isBack>
  2. <view slot="backText">返回</view>
  3. <view slot="content">附件</view>
  4. </cu-custom>
  5. <view class="section">
  6. <!-- 其他 -->
  7. <view wx:for="{{value}}" wx:key="index" class="margin-bottom">
  8. <view class="cu-bar bg-white solid-bottom">
  9. <view class='action'>
  10. <text class='cuIcon-titles text-orange '></text> {{item.name}}
  11. </view>
  12. </view>
  13. <view class="padding">
  14. <van-grid column-num="3" border="{{ false }}" gutter="{{ 10 }}">
  15. <van-grid-item use-slot wx:for="{{ item.value }}" wx:for-item="it" wx:for-index="ind" wx:key="ind">
  16. <view wx:if="{{it.value }}" style="position:relative;width: 100%;height: 180rpx;">
  17. <image mode="aspectFit" style="width: 100%; height: 100%;" src="{{it.value}}" />
  18. <view bindtap="deleteFunc" data-index='{{index}}' data-ind="{{ind}}" data-id="{{it.key}}"
  19. style='position: absolute; top: -16rpx;right: -16rpx;'>
  20. <van-icon name="clear" />
  21. </view>
  22. </view>
  23. </van-grid-item>
  24. <van-grid-item wx:if="{{(item.maxlen && item.value.length < item.maxlen) || !item.maxlen}}" use-slot>
  25. <view data-index="{{index}}" bindtap="addFunc"
  26. style="position:relative;width: 100%;height: 180rpx;display: flex;align-items: center;justify-content: center;border:1rpx solid #646566">
  27. <van-icon name="plus" size="30" color="#646566" />
  28. </view>
  29. </van-grid-item>
  30. </van-grid>
  31. </view>
  32. </view>
  33. </view>
  34. <!-- 错误提示框 -->
  35. <van-dialog use-slot title="提示" show="{{ errorShow }}" confirmText="关闭">
  36. <scroll-view scroll-y style="max-height:50vh;">
  37. <view wx:for="{{megs}}" wx:key="index" class="margin-sm">{{index+1}}、 {{item}}</view>
  38. </scroll-view>
  39. </van-dialog>
  40. <van-dialog id="van-dialog" />