合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.5 KiB

1 week ago
  1. @import '~@/uni_modules/lime-style/index.scss';
  2. $prefix: l !default;
  3. $upload: #{$prefix}-upload;
  4. $upload-add-color: create-var(upload-add-color, $text-color-4);
  5. $upload-add-bg-color: create-var(upload-add-bg-color, $gray-1);
  6. $upload-add-disabled-bg-color: create-var(upload-add-disabled-bg-color, $gray-2);
  7. $upload-add-icon-font-size: create-var(upload-add-icon-font-size, 28px);
  8. // $upload-add-icon-disabled-color: create-var(upload-add-icon-disabled-color, $text-color-4);
  9. $upload-radius: create-var(upload-radius, $border-radius);
  10. $upload-width: create-var(upload-width, 80px);
  11. $upload-height: create-var(upload-height, 80px);
  12. $upload-background: create-var(upload-background, $upload-add-bg-color);
  13. $upload-delete-icon-color: create-var(upload-delete-icon-color, white);
  14. $upload-gap: create-var(upload-gap, 8px);
  15. // $upload-disabled-mask: create-var(upload-disabled-mask, rgba(0, 0, 0, 0.6));
  16. // $upload-drag-z-index: create-var(upload-drag-z-index, 999);
  17. .#{$upload} {
  18. /* #ifndef UNI-APP-X */
  19. display: flex;
  20. /* #endif */
  21. flex: 1;
  22. position: relative;
  23. flex-direction: row;
  24. flex-wrap: wrap;
  25. &__item {
  26. position: relative;
  27. // flex: 1;
  28. /* #ifdef APP-ANDROID || APP-IOS || WEB */
  29. width: $upload-width;
  30. height: $upload-height;
  31. border-radius: $upload-radius;
  32. overflow: hidden;
  33. align-items: center;
  34. justify-content: center;
  35. /* #endif */
  36. /* #ifndef APP-ANDROID || APP-IOS || WEB */
  37. &-inner {
  38. overflow: hidden;
  39. display: flex;
  40. border-radius: $upload-radius;
  41. align-items: center;
  42. justify-content: center;
  43. min-width: $upload-width;
  44. // width: 100%;
  45. // height: 100%;
  46. height: $upload-height;
  47. position: relative;
  48. }
  49. /* #endif */
  50. &--add {
  51. /* #ifdef APP-ANDROID || APP-IOS || WEB */
  52. background: $upload-background;
  53. /* #endif */
  54. /* #ifndef APP-ANDROID || APP-IOS || WEB */
  55. & > view {
  56. background: $upload-background;
  57. }
  58. /* #endif */
  59. /* #ifndef APP-ANDROID || APP-IOS */
  60. font-size: $upload-add-icon-font-size;
  61. color: $upload-add-color;
  62. // text {
  63. // font-size: inherit;
  64. // }
  65. /* #endif*/
  66. }
  67. &--disabled {
  68. // background-color: $upload-add-disabled-bg-color;
  69. // color: $upload-add-icon-disabled-color;
  70. opacity: 0.5;
  71. /* #ifndef APP-ANDROID || APP-IOS */
  72. cursor: not-allowed;
  73. /* #endif */
  74. }
  75. }
  76. &__image {
  77. width: 100%;
  78. height: 100%;
  79. }
  80. &__add-icon {
  81. font-size: $upload-add-icon-font-size;
  82. color: $upload-add-color;
  83. // position: absolute;
  84. // top: 50%;
  85. // left: 50%;
  86. // transform: translate3d(-50%, -50%, 0);
  87. }
  88. &__delete-btn {
  89. position: absolute;
  90. top: 0;
  91. right: 0;
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. width: 20px;
  96. height: 20px;
  97. border-top-right-radius: $upload-radius;
  98. border-bottom-left-radius: $upload-radius;
  99. background-color: $text-color-2;
  100. /* #ifndef APP-ANDROID || APP-IOS */
  101. color: $upload-delete-icon-color;
  102. /* #endif */
  103. }
  104. &__progress {
  105. &-mask {
  106. position: absolute;
  107. left: 0;
  108. top: 0;
  109. bottom: 0;
  110. width: 100%;
  111. background-color: $bg-color-mask;
  112. flex-direction: column;
  113. align-items: center;
  114. justify-content: center;
  115. border-radius: $upload-radius;
  116. padding: 16px 0;
  117. /* #ifndef APP-ANDROID || APP-IOS */
  118. display: flex;
  119. color: white;
  120. /* #endif */
  121. }
  122. &-text {
  123. font-size: 12px;
  124. line-height: 20px;
  125. margin-top: 4px;
  126. color: white;
  127. }
  128. &-loading {
  129. align-self: center;
  130. }
  131. &-icon {
  132. color: white;
  133. font-size: 24px !important;
  134. width: 24px!important;
  135. }
  136. }
  137. }