drawer.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. @use '../helpers/baseMixin.scss';
  2. .vxe-drawer--wrapper {
  3. display: none;
  4. position: fixed;
  5. top: 0;
  6. left: 0;
  7. line-height: 1.5;
  8. width: calc(100% + 18px);
  9. height: calc(100% + 18px);
  10. color: var(--vxe-ui-font-color);
  11. font-family: var(--vxe-ui-font-family);
  12. outline: 0;
  13. &.is--active {
  14. display: block;
  15. }
  16. &.is--visible {
  17. &.is--mask {
  18. &:before {
  19. background-color: rgba(0, 0, 0, 0.5);
  20. }
  21. }
  22. &.pos--left {
  23. .vxe-drawer--box {
  24. left: 0;
  25. }
  26. }
  27. &.pos--right {
  28. .vxe-drawer--box {
  29. right: 0;
  30. }
  31. }
  32. &.pos--top {
  33. .vxe-drawer--box {
  34. top: 0;
  35. }
  36. }
  37. &.pos--bottom {
  38. .vxe-drawer--box {
  39. bottom: 0;
  40. }
  41. }
  42. .vxe-drawer--box {
  43. opacity: 1;
  44. }
  45. }
  46. &:not(.lock--view) {
  47. pointer-events: none;
  48. }
  49. &.lock--scroll {
  50. overflow: hidden;
  51. }
  52. &:not(.lock--scroll) {
  53. overflow: auto;
  54. }
  55. &.lock--view,
  56. &.is--mask {
  57. &:before {
  58. content: "";
  59. position: fixed;
  60. top: 0;
  61. left: 0;
  62. width: 100%;
  63. height: 100%;
  64. z-index: -1;
  65. pointer-events: auto;
  66. }
  67. }
  68. &.is--mask {
  69. &:before {
  70. background-color: rgba(0, 0, 0, 0);
  71. @include baseMixin.createAnimationTransition(background-color, 0.2s);
  72. }
  73. }
  74. &.pos--left {
  75. .vxe-drawer--box {
  76. top: 0;
  77. left: -100%;
  78. box-shadow: 2px 0 10px 0 rgba(0, 0, 0, 0.2);
  79. }
  80. }
  81. &.pos--right {
  82. .vxe-drawer--box {
  83. top: 0;
  84. right: -100%;
  85. box-shadow: -2px 0 10px 0 rgba(0, 0, 0, 0.2);
  86. }
  87. }
  88. &.pos--top {
  89. .vxe-drawer--box {
  90. top: -100%;
  91. left: 0;
  92. box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
  93. }
  94. }
  95. &.pos--bottom {
  96. .vxe-drawer--box {
  97. bottom: -100%;
  98. left: 0;
  99. box-shadow: 0 -2px 10px 0 rgba(0, 0, 0, 0.2);
  100. }
  101. }
  102. &.pos--left,
  103. &.pos--right {
  104. .vxe-drawer--box {
  105. width: 30%;
  106. height: 100%;
  107. }
  108. }
  109. &.pos--top,
  110. &.pos--bottom {
  111. .vxe-drawer--box {
  112. width: 100%;
  113. height: 30%;
  114. }
  115. }
  116. &.is--padding {
  117. .vxe-drawer--body-default {
  118. padding: 0.8em 0.6em;
  119. .vxe-drawer--status-wrapper {
  120. padding-right: 0.6em;
  121. }
  122. }
  123. }
  124. }
  125. .vxe-drawer--box {
  126. display: flex;
  127. flex-direction: row;
  128. position: fixed;
  129. background-color: var(--vxe-ui-layout-background-color);
  130. border: 1px solid var(--vxe-ui-base-popup-border-color);
  131. text-align: left;
  132. pointer-events: auto;
  133. opacity: 0;
  134. @include baseMixin.createAnimationTransition(all, 0.3s);
  135. &.is--drag {
  136. cursor: move;
  137. transition: none;
  138. .vxe-modal--body,
  139. .vxe-modal--footer {
  140. &:after {
  141. content: "";
  142. position: absolute;
  143. top: 0;
  144. left: 0;
  145. width: 100%;
  146. height: 100%;
  147. }
  148. }
  149. .vxe-modal--body {
  150. overflow: hidden;
  151. .vxe-modal--content {
  152. overflow: hidden;
  153. }
  154. }
  155. }
  156. }
  157. .vxe-drawer--aside {
  158. flex-shrink: 0;
  159. overflow: auto;
  160. outline: 0;
  161. }
  162. .vxe-drawer--container {
  163. display: flex;
  164. flex-direction: column;
  165. width: 100%;
  166. height: 100%;
  167. overflow: auto;
  168. outline: 0;
  169. }
  170. .vxe-drawer--content {
  171. flex-grow: 1;
  172. white-space: pre-line;
  173. }
  174. .vxe-drawer--header,
  175. .vxe-drawer--body,
  176. .vxe-drawer--footer {
  177. position: relative;
  178. }
  179. .vxe-drawer--body {
  180. display: flex;
  181. flex-grow: 1;
  182. overflow: auto;
  183. outline: 0;
  184. .vxe-drawer--content {
  185. overflow: auto;
  186. }
  187. }
  188. .vxe-drawer--body-left,
  189. .vxe-drawer--body-right {
  190. flex-shrink: 0;
  191. overflow: auto;
  192. outline: 0;
  193. }
  194. .vxe-drawer--body-default {
  195. display: flex;
  196. flex-grow: 1;
  197. overflow: auto;
  198. outline: 0;
  199. }
  200. .vxe-drawer--header {
  201. display: flex;
  202. flex-direction: row;
  203. flex-shrink: 0;
  204. font-size: 1.1em;
  205. font-weight: 700;
  206. border-bottom: 1px solid var(--vxe-ui-base-popup-border-color);
  207. &.is--ellipsis {
  208. .vxe-drawer--header-title {
  209. overflow: hidden;
  210. text-overflow: ellipsis;
  211. white-space: nowrap;
  212. }
  213. }
  214. }
  215. .vxe-drawer--header-title {
  216. flex-grow: 1;
  217. padding: 0.6em 0 0.6em 1em;
  218. }
  219. .vxe-drawer--header-right {
  220. display: flex;
  221. flex-direction: row;
  222. flex-shrink: 0;
  223. padding: 0.6em 1em 0.6em 0;
  224. }
  225. .vxe-drawer--footer-wrapper {
  226. display: flex;
  227. flex-direction: row;
  228. .vxe-drawer--footer-left {
  229. flex-grow: 1;
  230. text-align: left
  231. }
  232. .vxe-drawer--footer-right {
  233. flex-shrink: 0;
  234. }
  235. }
  236. .vxe-drawer--close-btn {
  237. cursor: pointer;
  238. margin-left: 0.6em;
  239. &:hover {
  240. color: var(--vxe-ui-font-primary-color);
  241. }
  242. }
  243. .vxe-drawer--footer {
  244. flex-shrink: 0;
  245. text-align: right;
  246. padding: 0.4em 1em 0.8em 1em;
  247. }
  248. .vxe-drawer--resize {
  249. $SpaceSize: 8px;
  250. $SpaceWidth: 5px;
  251. .wl-resize,
  252. .wr-resize,
  253. .st-resize,
  254. .sb-resize {
  255. position: absolute;
  256. z-index: 100;
  257. }
  258. .wl-resize,
  259. .wr-resize {
  260. width: $SpaceSize;
  261. height: 100%;
  262. top: 0;
  263. cursor: w-resize;
  264. }
  265. .wl-resize {
  266. left: -$SpaceWidth;
  267. }
  268. .wr-resize {
  269. right: -$SpaceWidth;
  270. }
  271. .st-resize,
  272. .sb-resize {
  273. width: 100%;
  274. height: $SpaceSize;
  275. left: 0;
  276. cursor: s-resize;
  277. }
  278. .st-resize {
  279. top: -$SpaceWidth;
  280. }
  281. .sb-resize {
  282. bottom: -$SpaceWidth;
  283. }
  284. }
  285. .vxe-drawer--wrapper {
  286. font-size: var(--vxe-ui-font-size-default);
  287. &.size--medium {
  288. font-size: var(--vxe-ui-font-size-medium);
  289. }
  290. &.size--small {
  291. font-size: var(--vxe-ui-font-size-small);
  292. }
  293. &.size--mini {
  294. font-size: var(--vxe-ui-font-size-mini);
  295. }
  296. }