4933aaf1448b7fb7caa10b573535c673325667dee92a5a422785bc695dc6facc51d26c219e07927165908f81a74154a8a162d688a7e6f64c725ee5ecc91d39 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. @import "mixins/mixins";
  2. @import "common/var";
  3. %size {
  4. width: 100%;
  5. height: 100%;
  6. }
  7. @include b(image) {
  8. position: relative;
  9. display: inline-block;
  10. overflow: hidden;
  11. @include e(inner) {
  12. @extend %size;
  13. vertical-align: top;
  14. @include m(center) {
  15. position: relative;
  16. top: 50%;
  17. left: 50%;
  18. transform: translate(-50%, -50%);
  19. display: block;
  20. }
  21. }
  22. @include e(placeholder) {
  23. @extend %size;
  24. background: $--background-color-base;
  25. }
  26. @include e(error) {
  27. @extend %size;
  28. display: flex;
  29. justify-content: center;
  30. align-items: center;
  31. font-size: 14px;
  32. background: $--background-color-base;
  33. color: $--color-text-placeholder;
  34. vertical-align: middle;
  35. }
  36. @include e(preview) {
  37. cursor: pointer;
  38. }
  39. }
  40. @include b(image-viewer) {
  41. @include e(wrapper) {
  42. position: fixed;
  43. top: 0;
  44. right: 0;
  45. bottom: 0;
  46. left: 0;
  47. }
  48. @include e(btn) {
  49. position: absolute;
  50. z-index: 1;
  51. display: flex;
  52. align-items: center;
  53. justify-content: center;
  54. border-radius: 50%;
  55. opacity: .8;
  56. cursor: pointer;
  57. box-sizing: border-box;
  58. user-select: none;
  59. }
  60. @include e(close) {
  61. top: 40px;
  62. right: 40px;
  63. width: 40px;
  64. height: 40px;
  65. font-size: 24px;
  66. color: #fff;
  67. background-color: #606266;
  68. }
  69. @include e(canvas) {
  70. width: 100%;
  71. height: 100%;
  72. display: flex;
  73. justify-content: center;
  74. align-items: center;
  75. }
  76. @include e(actions) {
  77. left: 50%;
  78. bottom: 30px;
  79. transform: translateX(-50%);
  80. width: 282px;
  81. height: 44px;
  82. padding: 0 23px;
  83. background-color: #606266;
  84. border-color: #fff;
  85. border-radius: 22px;
  86. @include e(actions__inner) {
  87. width: 100%;
  88. height: 100%;
  89. text-align: justify;
  90. cursor: default;
  91. font-size: 23px;
  92. color: #fff;
  93. display: flex;
  94. align-items: center;
  95. justify-content: space-around;
  96. }
  97. }
  98. @include e(prev){
  99. top: 50%;
  100. transform: translateY(-50%);
  101. width: 44px;
  102. height: 44px;
  103. font-size: 24px;
  104. color: #fff;
  105. background-color: #606266;
  106. border-color: #fff;
  107. left: 40px;
  108. }
  109. @include e(next){
  110. top: 50%;
  111. transform: translateY(-50%);
  112. width: 44px;
  113. height: 44px;
  114. font-size: 24px;
  115. color: #fff;
  116. background-color: #606266;
  117. border-color: #fff;
  118. right: 40px;
  119. text-indent: 2px;
  120. }
  121. @include e(mask) {
  122. position: absolute;
  123. width: 100%;
  124. height: 100%;
  125. top: 0;
  126. left: 0;
  127. opacity: .5;
  128. background: #000;
  129. }
  130. }
  131. .viewer-fade-enter-active {
  132. animation: viewer-fade-in .3s;
  133. }
  134. .viewer-fade-leave-active {
  135. animation: viewer-fade-out .3s;
  136. }
  137. @keyframes viewer-fade-in {
  138. 0% {
  139. transform: translate3d(0, -20px, 0);
  140. opacity: 0;
  141. }
  142. 100% {
  143. transform: translate3d(0, 0, 0);
  144. opacity: 1;
  145. }
  146. }
  147. @keyframes viewer-fade-out {
  148. 0% {
  149. transform: translate3d(0, 0, 0);
  150. opacity: 1;
  151. }
  152. 100% {
  153. transform: translate3d(0, -20px, 0);
  154. opacity: 0;
  155. }
  156. }