dialog.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. @import "../../styles/animation/fade";
  2. @import "../../styles/animation/ease";
  3. body.dialog-open {
  4. position: fixed; //width: 100%;
  5. //overflow:hidden;
  6. }
  7. .nut-dialog-wrapper {
  8. position: relative;
  9. z-index: $zindex-mask;
  10. }
  11. .nut-dialog-box {
  12. position: fixed;
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. color: $normal-color;
  17. }
  18. .nut-dialog-mask,
  19. .nut-dialog-box {
  20. left: 0;
  21. top: 0;
  22. right: 0;
  23. bottom: 0;
  24. }
  25. .nut-dialog-mask {
  26. position: fixed;
  27. background: $mask-bg;
  28. }
  29. .nut-dialog {
  30. position: relative;
  31. width: 86%;
  32. max-height: 70vh;
  33. background: #fff;
  34. border-radius: $border-radius-base;
  35. overflow: hidden;
  36. display: flex;
  37. flex-direction: column;
  38. }
  39. .nut-dialog-title {
  40. display: block;
  41. line-height: 1.5;
  42. color: $title-color;
  43. font-size: $font-size-large;
  44. text-align: center;
  45. flex-shrink: 0;
  46. @include text-ellipsis;
  47. padding-bottom: 8px; // &:only-child {
  48. // padding-bottom: 0;
  49. // }
  50. }
  51. .nut-dialog-close {
  52. position: absolute;
  53. right: 0;
  54. top: 0;
  55. width: 30px;
  56. height: 30px;
  57. font-size: 20px;
  58. text-align: center;
  59. text-decoration: none;
  60. background: url("data:image/svg+xml, %3Csvg width='30' height='30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23848484' fill-rule='evenodd'%3E%3Cpath d='M.44 2.56A1.5 1.5 0 1 1 2.56.44l27 27a1.5 1.5 0 1 1-2.12 2.12L15 17.123 2.56 29.56A1.5 1.5 0 1 1 .44 27.44L12.878 15 .44 2.56zM27.44.44a1.5 1.5 0 1 1 2.12 2.12l-9 9a1.5 1.5 0 1 1-2.12-2.12l9-9z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;
  61. background-size: 13px 13px;
  62. img {
  63. height: 13px;
  64. }
  65. }
  66. .nut-dialog-image-wrapper {
  67. .nut-dialog {
  68. width: auto;
  69. max-width: 80%;
  70. max-height: 75%;
  71. background: transparent;
  72. border-radius: none;
  73. display: inline-block;
  74. overflow: visible;
  75. }
  76. .nut-dialog-close {
  77. position: absolute;
  78. right: 0;
  79. top: -40px;
  80. width: 25px;
  81. height: 25px;
  82. font-size: 20px;
  83. text-align: center;
  84. text-decoration: none;
  85. border: 2px solid #FFF;
  86. border-radius: 50%;
  87. background: url("data:image/svg+xml, %3Csvg width='30' height='30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-rule='evenodd'%3E%3Cpath d='M.44 2.56A1.5 1.5 0 1 1 2.56.44l27 27a1.5 1.5 0 1 1-2.12 2.12L15 17.123 2.56 29.56A1.5 1.5 0 1 1 .44 27.44L12.878 15 .44 2.56zM27.44.44a1.5 1.5 0 1 1 2.12 2.12l-9 9a1.5 1.5 0 1 1-2.12-2.12l9-9z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;
  88. background-size: 13px 13px;
  89. img {
  90. height: 13px;
  91. }
  92. }
  93. }
  94. .nut-dialog-link {
  95. display: inline-block;
  96. }
  97. .nut-dialog-image {
  98. max-width: 100%;
  99. max-height: 100%;
  100. vertical-align: bottom;
  101. }
  102. .nut-dialog-body {
  103. box-sizing: border-box;
  104. padding: 30px 20px 20px;
  105. display: flex;
  106. flex-direction: column;
  107. flex: 1;
  108. }
  109. .nut-dialog-content {
  110. flex: 1;
  111. justify-content: center;
  112. overflow: auto;
  113. font-size: $font-size-base;
  114. word-break: break-all;
  115. padding-bottom: 10px;
  116. -webkit-overflow-scrolling: touch;
  117. }
  118. .nut-dialog-footer {
  119. height: 50px;
  120. width: 100%;
  121. line-height: 50px;
  122. display: flex;
  123. flex-shrink: 0;
  124. border-radius: 0 0 5px 5px;
  125. overflow: hidden;
  126. flex-direction: row;
  127. }
  128. .nut-dialog-btn {
  129. display: block;
  130. width: 100%;
  131. height:100%;
  132. flex: 1;
  133. font-size: $font-size-base;
  134. border: none;
  135. background: transparent;
  136. appearance: none;
  137. outline: none;
  138. &.disabled {
  139. background: $btn-disable-bg;
  140. color: $btn-disable-color;
  141. }
  142. &:only-child {
  143. border-radius: 0 0 5px 5px;
  144. background: transparent;
  145. color: $primary-color;
  146. border-top: 1px solid $light-color;
  147. }
  148. &:active{
  149. opacity: .7;
  150. }
  151. }
  152. .nut-dialog-ok {
  153. border-radius: 0 0 5px 0;
  154. background: $btn-gradient-bg;
  155. color: $btn-gradient-color;
  156. }
  157. .nut-dialog-cancel {
  158. border-radius: 0 0 0 5px;
  159. border-top: 1px solid $light-color;
  160. }
  161. // .fade-enter-active {
  162. // animation: zoomIn 0.3s forwards;
  163. // }
  164. // @keyframes zoomIn {
  165. // 0% {
  166. // opacity: 0;
  167. // transform: scale3d(1.3, 1.3, 1.3);
  168. // }
  169. // 50% {
  170. // opacity: 1;
  171. // }
  172. // }
  173. // @keyframes zoomOut {
  174. // 0% {
  175. // opacity: 1;
  176. // }
  177. // 50% {
  178. // opacity: 0;
  179. // transform: scale3d(1.3, 1.3, 1.3);
  180. // }
  181. // 100% {
  182. // opacity: 0;
  183. // }
  184. // }
  185. // .fade-leave-active {
  186. // animation: zoomOut 0.3s forwards;
  187. // }