upload.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. .@{elNamespace}-upload{
  2. &:focus{
  3. color: unset;
  4. .@{elNamespace}-upload-dragger{
  5. border-color: var(--el-border-color);
  6. }
  7. }
  8. &.is-drag{
  9. flex: auto;
  10. }
  11. &__tip{
  12. color: var(--el-text-color-secondary);
  13. margin: 0;
  14. line-height: 12px;
  15. }
  16. &-list{
  17. flex-shrink: 0;
  18. width: 100%;
  19. &__item{
  20. padding: 4px;
  21. margin-bottom: 4px;
  22. display: flex;
  23. justify-content: space-between;
  24. &:hover{
  25. cursor: pointer;
  26. .upload--close{
  27. display: block;
  28. }
  29. .upload--success{
  30. display: none;
  31. }
  32. }
  33. &.is-ready{
  34. .upload--close{
  35. display: none;
  36. }
  37. .upload--success{
  38. display: none;
  39. }
  40. }
  41. &.is-error{
  42. .upload--close{
  43. display: block;
  44. margin-left: 5px;
  45. }
  46. .upload--success{
  47. display: none;
  48. }
  49. .@{elNamespace}-upload-list__item-name{
  50. color:var(--el-color-danger) !important;
  51. }
  52. }
  53. &-name{
  54. overflow: hidden;
  55. padding-left: 0 !important;
  56. &:hover{
  57. color: unset !important;
  58. }
  59. }
  60. &-actions{
  61. display: none !important;
  62. }
  63. &-label{
  64. display: flex;
  65. }
  66. .upload--close{
  67. display: none;
  68. }
  69. .upload--success{
  70. color: var(--el-color-success);
  71. }
  72. .el-progress__text{
  73. display: none;
  74. }
  75. }
  76. &--picture-card{
  77. --el-upload-list-picture-card-size: 80px;
  78. .@{elNamespace}-upload-list__item{
  79. overflow: visible;
  80. border-radius: 2px;
  81. border: 0;
  82. background-color: var(--el-fill-color);
  83. img{
  84. border-radius: inherit;
  85. width: 100%;
  86. height: 100%;
  87. }
  88. }
  89. .upload--close{
  90. i{
  91. font-size: 16px;
  92. color: var(--el-color-danger);
  93. position: relative;
  94. top: -1px;
  95. left: -1px;
  96. }
  97. position: absolute;
  98. right: -6px;
  99. top: -6px;
  100. width: 14px;
  101. height: 14px;
  102. border-radius: 50%;
  103. background-color: #fff;
  104. }
  105. }
  106. &--picture{
  107. display: flex;
  108. flex-wrap: wrap;
  109. li{
  110. display: flex;
  111. position: relative;
  112. margin: 0 8px 8px 0;
  113. padding: 8px;
  114. background-color: var(--el-fill-color-light);
  115. font-size: 12px;
  116. line-height: 18px;
  117. cursor: pointer;
  118. &:hover{
  119. .upload--close{
  120. display: block;
  121. }
  122. }
  123. i, img {
  124. width: 36px;
  125. height: 36px;
  126. display: inline-block;
  127. margin-right: 8px;
  128. }
  129. .item-name{
  130. max-width: 120px;
  131. overflow: hidden;
  132. text-overflow: ellipsis;
  133. white-space: nowrap;
  134. }
  135. .item-size{
  136. color: var( --el-text-color-secondary);
  137. }
  138. .upload--close{
  139. i{
  140. font-size: 16px;
  141. color: var(--el-color-danger);
  142. position: relative;
  143. top: -1px;
  144. left: -1px;
  145. width: 16px;
  146. height: 16px;
  147. }
  148. position: absolute;
  149. right: -6px;
  150. top: -6px;
  151. width: 14px;
  152. height: 14px;
  153. border-radius: 50%;
  154. background-color: #fff;
  155. display: none;
  156. }
  157. }
  158. }
  159. }
  160. &--picture-card {
  161. --el-upload-picture-card-size: 80px;
  162. flex-direction: column;
  163. margin: 0 8px 8px 0;
  164. line-height: 18px;
  165. font-size: 12px;
  166. border-radius: 2px;
  167. color: var(--el-text-color-secondary);
  168. background-color: #fff;
  169. &:hover{
  170. color: var(--el-text-color-secondary);
  171. }
  172. i {
  173. font-size: 18px;
  174. }
  175. }
  176. }
  177. .@{elNamespace}-image__error{
  178. background-color: var(--el-fill-color);
  179. }