.ml-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  &.type-image {
    .ant-upload {
      display: block;
    }
    .file-list {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      max-height: 220px;
    }
  }
  .ant-upload {
    display: inline-block;
  }
  .add-btn {
    .img-btn {
      position: absolute;
      left: 5px;
      top: 5px;
      z-index: 6;
      width: 100px;
      height: 100px;
      border: 1px dashed #dcdfe6;
      .mlicon-add {
        font-size: 30px;
      }
    }
  }
  .file-list {
    flex-grow: 1;
    line-height: 26px;
    max-height: 166px;
    overflow: auto;
  }
  .file-all-item {
    position: relative;
    display: flex;
    &:hover {
      background-color: #e6f7ff;
    }
    .file-name {
      flex-grow: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .oper-btns {
      flex-shrink: 0;
      padding-left: 5px;
    }
    .preview-btn,
    .down-btn {
      color: rgba(0, 0, 0, 0.65);
    }
  }
  .file-img-item {
    position: relative;
    display: inline-block;
    margin: 5px;
    .img-item {
      position: relative;
      display: flex;
      align-items: center;
      justify-items: center;
      width: 100px;
      height: 100px;
      padding: 5px;
      border: 1px solid #d9d9d9;
      border-radius: 4px;
      &:hover {
        &:before {
          opacity: 1;
        }
        .oper-btns {
          display: block;
        }
      }
      &:before {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 3;
        width: 100%;
        height: 100%;
        opacity: 0;
        background-color: rgba(0,0,0,.5);
        transition: all .3s;
        content: " ";
      }
      img {
        max-width: 100%;
        max-height: 100%;
        vertical-align: middle;
        margin: 0 auto;
      }
    }
    .oper-btns {
      display: none;
      width: 100%;
      text-align: center;
      position: absolute;
      top: 50%;
      left: 0;
      transform: translateY(-50%);
      z-index: 5;
    }
  }
  &.size-large {
    .file-img-item {
      .img-item {
        width: 120px;
        height: 120px;
      }
    }
  }
  &.size-medium {
    .file-img-item {
      .img-item {
        width: 100px;
        height: 100px;
      }
    }
  }
  &.size-small {
    .file-img-item {
      .img-item {
        width: 80px;
        height: 80px;
      }
    }
  }
  &.size-mini {
    .file-img-item {
      .img-item {
        width: 60px;
        height: 60px;
      }
    }
  }
  .preview-btn,
  .del-btn,
  .down-btn {
    margin: 0 4px;
    color: #fff;
    &:hover {
      color: #1890ff;
    }
  }
  .del-btn {
    color: red;
    &:hover {
      color: red;
    }
  }
}
.ml-upload-preview-content {
  height: 100%;
  .img-warpper {
    position: relative;
    height: 100%;
    &:hover {
      .prev-arrow,
      .next-arrow {
        display: flex;
      }
    }
    .prev-arrow,
    .next-arrow {
      display: none;
      position: absolute;
      align-items: center;
      justify-content: center;
      top: 50%;
      transform: translateY(-50%);
      color: #ffffff;
      font-size: 18px;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      cursor: pointer;
      opacity: 0.5;
      background-color: #606266;
      &:hover {
        opacity: 0.8;
      }
    }
    .prev-arrow {
      left: 20px;
    }
    .next-arrow {
      right: 20px;
    }
  }
  .img-list {
    position: relative;
    height: 100%;
    text-align: center;
    overflow: hidden;
    .image {
      display: none;
      transition: transform 0.3s ease 0s;
      &.is-active {
        display: inline-block;
      }
    }
  }
  .video-warpper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    video {
      max-width: 50vw;
      max-height: 80vh;
    }
  }
  .frame-warpper {
    width: 100%;
    height: 100%;
    border: 0;
  }
}
.ml-upload-preview-modal {
  .vxe-modal--box {
    border: 0;
    background: transparent;
  }
  .vxe-modal--box {
    .vxe-modal--header {
      background: transparent;
      border: 0;
    }
    .vxe-modal--header-right {
      color: #fff;
      font-size: 14px;
    }
    .vxe-modal--body {
      overflow: hidden;
      .vxe-modal--content {
        overflow: hidden;
      }
    }
  }
}
.ml-upload-preview-actions {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 282px;
  height: 44px;
  padding: 0 23px;
  background-color: #606266;
  border-color: #fff;
  border-radius: 22px;
  opacity: .8;
  cursor: pointer;
  .ml-upload-preview-btn {
    color: #ffffff;
    font-size: 16px;
    &:hover {
      color: #ffffff;
    }
  }
}