clarms-upload.vue 1.72 KB
<template>
  <div>
    <div class="clarms-container">
      <div class="clarms-box">
        <div class="clarms-header">
          <div class="clarms-header-2">
            <img class="clarms-icon" :src='icon'>
            <div class="clarms-title-container">
              <div class="clarms-t1" :class="{clarmsActivty:images && images.length > 0}">{{options.name}}</div>
              <div class="clarms-t2">已上传文件:{{uploadFiles}}</div>
            </div>
          </div>
          <div class="clarms-btn" :class="{disabled:uploading}" @click="selectMutilFile">
            上传
          </div>
        </div>
        <div v-if="images && images.length > 0">
          <hr>
          <div class="clarms-img-group">
            <div class="clarms-img-item-plugin" @mouseover="onOverHandler($event,item,index)" v-for="(item,index) in images" :key="index">
              <div class="clarms-img-item">
                <img class="clarms-img-cont" :src="item.data">
                <div class="clarms-img-mask" v-if="item.showMask">
                  <img src="@/assets/images/clarms/close.png">
                </div>
                <div class="clarms-img-mask" v-if="item.showMask" @mouseout="onOutHandler($event,item,index)" @click="removeItem(index)">
                </div>
              </div>
              <div class="clarms-upload-tips" v-if="!item.cacheKey && !item.err">Uploading{{item.tips}}</div>
              <div class="clarms-upload-tips" v-if="item.err">{{item.err}}</div>
            </div>
          </div>
          <div class="clarms-empty-line"></div>
        </div>
      </div>
    </div>
  </div>
</template>


<script src="./clarms-upload.js"></script>
<style lang="scss" scoped>
@import "./clarms-upload.scss";
</style>