split.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. @use "sass:list";
  2. @use '../helpers/baseMixin.scss';
  3. .vxe-split {
  4. position: relative;
  5. width: 100%;
  6. &.is--vertical {
  7. & > .vxe-split-wrapper {
  8. flex-direction: column;
  9. & > .vxe-split-pane {
  10. width: 100%;
  11. }
  12. }
  13. }
  14. &.is--drag {
  15. user-select: none;
  16. &.is-resize--immediate {
  17. &.is--horizontal {
  18. cursor: w-resize;
  19. }
  20. &.is--vertical {
  21. cursor: n-resize;
  22. }
  23. }
  24. &.is-resize--lazy {
  25. &.is--horizontal {
  26. cursor: col-resize;
  27. }
  28. &.is--vertical {
  29. cursor: row-resize;
  30. }
  31. }
  32. & > .vxe-split-wrapper {
  33. & > .vxe-split-pane {
  34. & > .vxe-split-pane--wrapper {
  35. &::after {
  36. content: "";
  37. position: absolute;
  38. top: 0;
  39. left: 0;
  40. width: 100%;
  41. height: 100%;
  42. z-index: 1;
  43. background: transparent;
  44. user-select: none;
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. .vxe-split--resizable-split-tip {
  52. display: none;
  53. position: absolute;
  54. top: 0;
  55. left: 0;
  56. z-index: 7;
  57. pointer-events: none;
  58. user-select: none;
  59. cursor: col-resize;
  60. &.is-resize--lazy {
  61. &:before {
  62. content: "";
  63. display: block;
  64. height: 100%;
  65. background-color: var(--vxe-ui-split-resizable-drag-line-color);
  66. }
  67. }
  68. &.is--horizontal {
  69. width: 1px;
  70. height: 100%;
  71. .vxe-split--resizable-split-number-prev {
  72. right: 0;
  73. }
  74. .vxe-split--resizable-split-number-next {
  75. left: 1px;
  76. }
  77. }
  78. &.is--vertical {
  79. width: 100%;
  80. height: 1px;
  81. .vxe-split--resizable-split-number-prev {
  82. bottom: 0;
  83. }
  84. .vxe-split--resizable-split-number-next {
  85. top: 1px;
  86. }
  87. }
  88. }
  89. .vxe-split--resizable-split-tip-number {
  90. position: absolute;
  91. top: 0;
  92. left: 0;
  93. user-select: none;
  94. pointer-events: none;
  95. }
  96. .vxe-split--resizable-split-number-prev,
  97. .vxe-split--resizable-split-number-next {
  98. position: absolute;
  99. padding: 0.25em 0.25em;
  100. font-size: 12px;
  101. border-radius: var(--vxe-ui-border-radius);
  102. white-space: nowrap;
  103. color: #ffffff;
  104. background-color: var(--vxe-ui-split-resizable-drag-line-color);
  105. }
  106. .vxe-split-wrapper {
  107. height: 100%;
  108. display: flex;
  109. flex-direction: row;
  110. overflow: hidden;
  111. }
  112. .vxe-split-slots {
  113. display: none;
  114. }
  115. .vxe-split-pane-handle {
  116. display: flex;
  117. position: relative;
  118. flex-shrink: 0;
  119. user-select: none;
  120. }
  121. .vxe-split-pane--wrapper {
  122. position: relative;
  123. word-break: break-word;
  124. overflow: hidden;
  125. flex-grow: 1;
  126. }
  127. .vxe-split-pane--inner {
  128. height: 100%;
  129. width: 100%;
  130. overflow: auto;
  131. & > .vxe-split {
  132. height: 100%;
  133. }
  134. }
  135. .vxe-split-pane-handle-bar {
  136. background-color: var(--vxe-ui-split-handle-bar-background-color);
  137. &:hover {
  138. background-color: var(--vxe-ui-split-handle-bar-hover-background-color);
  139. }
  140. }
  141. .vxe-split-pane-action-btn-wrapper {
  142. position: absolute;
  143. display: flex;
  144. top: 50%;
  145. left: 50%;
  146. transform: translate(-50%, -50%);
  147. z-index: 2;
  148. }
  149. .vxe-split-pane-action-btn {
  150. display: flex;
  151. flex-direction: row;
  152. align-items: center;
  153. justify-content: center;
  154. border-radius: var(--vxe-ui-base-border-radius);
  155. color: var(--vxe-ui-layout-background-color);
  156. background-color: var(--vxe-ui-split-handle-button-background-color);
  157. border: 1px solid var(--vxe-ui-input-border-color);
  158. cursor: pointer;
  159. @include baseMixin.createAnimationTransition(transform, 0.1s);
  160. &:hover {
  161. color: #ffffff;
  162. background-color: var(--vxe-ui-font-primary-color);
  163. }
  164. &:active {
  165. transform: scale(0.9);
  166. }
  167. & > i {
  168. font-size: 0.6em;
  169. }
  170. }
  171. .vxe-split-pane-handle {
  172. &.is--horizontal {
  173. flex-direction: row;
  174. &.is--border {
  175. border-width: 1px 0 1px 0;
  176. }
  177. .vxe-split-pane-action-btn-wrapper {
  178. flex-direction: column;
  179. & div {
  180. margin-top: 1em;
  181. &:first-child {
  182. margin-top: 0;
  183. }
  184. }
  185. }
  186. .vxe-split-pane-handle-bar {
  187. width: var(--vxe-ui-split-handle-bar-horizontal-width);
  188. height: 100%;
  189. }
  190. .vxe-split-pane-action-btn {
  191. width: var(--vxe-ui-split-handle-bar-horizontal-width);
  192. height: var(--vxe-ui-split-handle-bar-horizontal-height);
  193. }
  194. }
  195. &.is--vertical {
  196. flex-direction: column;
  197. &.is--border {
  198. border-width: 0 1px 0 1px;
  199. }
  200. .vxe-split-pane-action-btn-wrapper {
  201. flex-direction: row;
  202. & div {
  203. margin-left: 1em;
  204. &:first-child {
  205. margin-left: 0;
  206. }
  207. }
  208. }
  209. .vxe-split-pane-handle-bar {
  210. height: var(--vxe-ui-split-handle-bar-vertical-height);
  211. width: 100%;
  212. }
  213. .vxe-split-pane-action-btn {
  214. width: var(--vxe-ui-split-handle-bar-vertical-width);
  215. height: var(--vxe-ui-split-handle-bar-vertical-height);
  216. }
  217. }
  218. &.is--resize {
  219. &.is-resize--immediate {
  220. &.is--horizontal {
  221. .vxe-split-pane-handle-bar {
  222. cursor: w-resize;
  223. }
  224. }
  225. &.is--vertical {
  226. .vxe-split-pane-handle-bar {
  227. cursor: n-resize;
  228. }
  229. }
  230. & > .vxe-split-pane-handle-bar {
  231. &:active {
  232. background-color: var(--vxe-ui-font-primary-color);
  233. }
  234. }
  235. }
  236. &.is-resize--lazy {
  237. &.is--horizontal {
  238. .vxe-split-pane-handle-bar {
  239. cursor: col-resize;
  240. }
  241. }
  242. &.is--vertical {
  243. .vxe-split-pane-handle-bar {
  244. cursor: row-resize;
  245. }
  246. }
  247. }
  248. }
  249. }
  250. .vxe-split-pane {
  251. display: flex;
  252. position: relative;
  253. overflow: hidden;
  254. &.is--fill {
  255. flex-grow: 1;
  256. }
  257. &.is--hidden {
  258. &.is--horizontal {
  259. width: 0;
  260. }
  261. &.is--vertical {
  262. height: 0;
  263. }
  264. }
  265. &.is--padding {
  266. & > .vxe-split-pane--wrapper {
  267. padding: var(--vxe-ui-layout-padding-default);
  268. }
  269. }
  270. &.is--hidden,
  271. &.is--width,
  272. &.is--height {
  273. flex-shrink: 0;
  274. }
  275. &.is--border {
  276. & > .vxe-split-pane--wrapper {
  277. border: 1px solid var(--vxe-ui-base-popup-border-color);
  278. }
  279. }
  280. }
  281. .vxe-split--render-vars {
  282. width: 0;
  283. height: 0;
  284. overflow: hidden;
  285. .vxe-split--handle-bar-info {
  286. width: var(--vxe-ui-split-handle-bar-horizontal-width);
  287. height: var(--vxe-ui-split-handle-bar-vertical-height);
  288. }
  289. }
  290. .vxe-modal--content {
  291. & > .vxe-split {
  292. height: 100%;
  293. }
  294. }
  295. .vxe-split {
  296. font-size: var(--vxe-ui-font-size-default);
  297. &.size--medium {
  298. font-size: var(--vxe-ui-font-size-medium);
  299. }
  300. &.size--small {
  301. font-size: var(--vxe-ui-font-size-small);
  302. }
  303. &.size--mini {
  304. font-size: var(--vxe-ui-font-size-mini);
  305. }
  306. }