/*
 * @Author: 焦质晔
 * @Date: 2021-02-09 09:27:46
 * @Last Modified by: 焦质晔
 * @Last Modified time: 2024-11-05 19:14:37
 */
@use '../../style/src/themes' as *;
@use './cropper-preview' as *;

$prefix: '#{$qm-prefix}-upload-img';

.#{$prefix} {
  .el-upload--picture-card {
    width: 102px;
    height: 102px;
    flex-direction: column;
    border-radius: $border-radius-base;
    .el-upload-dragger {
      padding: 0;
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      height: 100%;
      background: none;
      border: none;
      cursor: inherit;
      border-radius: 0;
      .upload-drag-icon {
        font-size: 24px;
        line-height: 0;
        color: $primary-color;
      }
      .upload-text {
        font-size: $font-size-base - 1px;
        line-height: 1.5;
        color: $text-color-base;
      }
      .upload-button {
        display: inline-block;
        text-align: center;
        text-transform: none;
        text-decoration: none;
        background: transparent;
        border: 0;
        outline: 0;
        font-size: $font-size-base - 1px;
        transition: all 0.3s ease;
        cursor: inherit;
        &:focus {
          box-shadow: 0 0 2px 0 $primary-light-3;
          background-color: $primary-light-9;
        }
      }
    }
    &.is-disabled {
      color: #ccc;
      border-color: currentColor;
      cursor: not-allowed;
      .upload-button {
        pointer-events: none;
      }
    }
  }
  .el-upload-list__item {
    height: 102px !important;
    width: 102px !important;
    border-radius: $border-radius-base !important;
    justify-content: center;
    .upload-item {
      width: 100%;
      position: relative;
      margin: 6px;
    }
    span + span {
      margin-left: $margin-base;
    }
    &-actions {
      font-size: $font-size-lg !important;
    }
  }
  &.upload-icon__hidden {
    .el-upload--picture-card {
      display: none;
    }
  }
}
