custom.scss 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. @use '../../helpers/baseMixin.scss';
  2. .vxe-table-custom--option {
  3. position: relative;
  4. display: flex;
  5. flex-direction: row;
  6. &.active--drag-origin {
  7. opacity: 0.5;
  8. }
  9. &.active--drag-target {
  10. &[drag-pos="top"] {
  11. &::after {
  12. display: block;
  13. top: -2px;
  14. }
  15. }
  16. &[drag-pos="bottom"] {
  17. &::after {
  18. display: block;
  19. bottom: -2px;
  20. }
  21. }
  22. }
  23. &:first-child {
  24. &[drag-pos="top"] {
  25. &::after {
  26. top: 0;
  27. }
  28. }
  29. }
  30. &:last-child {
  31. &[drag-pos="bottom"] {
  32. &::after {
  33. bottom: 0;
  34. }
  35. }
  36. }
  37. &::after {
  38. display: none;
  39. content: "";
  40. position: absolute;
  41. left: -1px;
  42. width: calc(100% + 1px);
  43. height: 2px;
  44. background-color: var(--vxe-ui-font-primary-color);
  45. z-index: 12;
  46. }
  47. &:last-child {
  48. &::after {
  49. width: 100%;
  50. }
  51. }
  52. }
  53. .vxe-table-custom--handle-wrapper {
  54. display: flex;
  55. flex-direction: column;
  56. }
  57. .vxe-table-custom-wrapper {
  58. display: none;
  59. flex-direction: row;
  60. position: absolute;
  61. text-align: left;
  62. background-color: var(--vxe-ui-layout-background-color);
  63. z-index: 19;
  64. border: 1px solid var(--vxe-ui-table-border-color);
  65. border-radius: var(--vxe-ui-border-radius);
  66. box-shadow: var(--vxe-ui-base-popup-box-shadow);
  67. &.placement--top-left {
  68. top: 2px;
  69. left: 2px;
  70. }
  71. &.placement--top-right {
  72. top: 2px;
  73. right: 2px;
  74. }
  75. &.placement--bottom-left {
  76. bottom: 2px;
  77. left: 2px;
  78. }
  79. &.placement--bottom-right {
  80. bottom: 2px;
  81. right: 2px;
  82. }
  83. &.placement--left {
  84. left: 2px;
  85. }
  86. &.placement--right {
  87. right: 2px;
  88. }
  89. &.placement--left,
  90. &.placement--right {
  91. top: 2px;
  92. height: calc(100% - 4px);
  93. }
  94. &.is--active {
  95. display: flex;
  96. }
  97. }
  98. .vxe-table-custom-simple--body-wrapper {
  99. position: relative;
  100. flex-grow: 1;
  101. display: flex;
  102. flex-direction: row;
  103. }
  104. .vxe-table-custom--body {
  105. position: relative;
  106. display: block;
  107. flex-grow: 1;
  108. overflow-x: hidden;
  109. overflow-y: auto;
  110. }
  111. .vxe-table-custom--panel-list {
  112. list-style-type: none;
  113. margin: 0;
  114. padding: 0;
  115. & > li {
  116. max-width: 26em;
  117. min-width: 18em;
  118. padding: 0.2em 1em 0.2em 1em;
  119. @for $i from 2 through 8 {
  120. $interval: $i - 1 + 0.5;
  121. &.level--#{$i}{
  122. padding-left: #{$interval + 1.2}em;
  123. }
  124. }
  125. }
  126. }
  127. .vxe-table-custom--header {
  128. display: flex;
  129. align-items: center;
  130. flex-shrink: 0;
  131. height: 2.4em;
  132. font-weight: 700;
  133. border-bottom: 1px solid var(--vxe-ui-base-popup-border-color);
  134. user-select: none;
  135. }
  136. .vxe-table-custom--panel-list {
  137. .vxe-table-custom--checkbox-option {
  138. &:hover {
  139. background-color: var(--vxe-ui-table-row-hover-background-color);
  140. }
  141. }
  142. }
  143. .vxe-table-custom--footer-buttons {
  144. width: 100%;
  145. display: flex;
  146. flex-direction: row;
  147. flex-shrink: 0;
  148. border-top: 1px solid var(--vxe-ui-base-popup-border-color);
  149. button {
  150. flex-grow: 1;
  151. height: 2.8em;
  152. }
  153. }
  154. .vxe-table-custom--checkbox-option {
  155. @include baseMixin.createCheckboxIcon();
  156. }
  157. .vxe-table-custom--checkbox-option,
  158. .vxe-table-custom--sort-option {
  159. padding-right: 0.4em;
  160. flex-shrink: 0;
  161. user-select: none;
  162. }
  163. .vxe-table-custom--sort-option {
  164. display: flex;
  165. flex-direction: row;
  166. align-items: center;
  167. justify-content: center;
  168. }
  169. .vxe-table-custom--sort-btn {
  170. padding-left: 0.2em;
  171. padding-right: 0.4em;
  172. &:not(.is--disabled) {
  173. cursor: grab;
  174. &:active {
  175. cursor: grabbing;
  176. }
  177. &:hover {
  178. color: var(--vxe-ui-font-primary-color);
  179. }
  180. }
  181. &.is--disabled {
  182. color: var(--vxe-ui-input-disabled-color);
  183. cursor: not-allowed;
  184. }
  185. }
  186. .vxe-table-custom--name-option {
  187. flex-grow: 1;
  188. display: flex;
  189. flex-direction: row;
  190. overflow: hidden;
  191. }
  192. .vxe-table-custom--checkbox-label {
  193. flex-grow: 1;
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. white-space: nowrap;
  197. }
  198. .vxe-table-custom--fixed-option {
  199. flex-shrink: 0;
  200. padding-left: 0.5em;
  201. display: flex;
  202. flex-direction: row;
  203. align-items: center;
  204. user-select: none;
  205. }
  206. .vxe-table-custom-popup--body-wrapper {
  207. position: relative;
  208. display: flex;
  209. flex-direction: column;
  210. overflow: hidden;
  211. height: 100%;
  212. outline: 0;
  213. }
  214. .vxe-table-custom-popup--handle-wrapper {
  215. flex-grow: 1;
  216. outline: 0;
  217. overflow: auto;
  218. }
  219. .vxe-table-custom-popup--table-wrapper {
  220. border-bottom: 1px solid var(--vxe-ui-table-border-color);
  221. table {
  222. width: 100%;
  223. border: 0;
  224. table-layout: fixed;
  225. word-break: break-all;
  226. border-spacing: 0;
  227. border-collapse: separate;
  228. th {
  229. position: sticky;
  230. top: 0;
  231. text-align: left;
  232. border-top: 1px solid var(--vxe-ui-table-border-color);
  233. border-bottom: 1px solid var(--vxe-ui-table-border-color);
  234. border-left: 1px solid var(--vxe-ui-table-border-color);
  235. background-color: var(--vxe-ui-table-header-background-color);
  236. z-index: 7;
  237. }
  238. td {
  239. border-top: 1px solid var(--vxe-ui-table-border-color);
  240. border-left: 1px solid var(--vxe-ui-table-border-color);
  241. }
  242. tr {
  243. &:first-child {
  244. td {
  245. border-top: 0;
  246. }
  247. }
  248. &:hover {
  249. background-color: var(--vxe-ui-table-row-hover-background-color);
  250. }
  251. }
  252. th,
  253. td {
  254. height: 44px;
  255. padding: 0 0.6em;
  256. &:last-child {
  257. border-right: 1px solid var(--vxe-ui-table-border-color);
  258. }
  259. }
  260. }
  261. }
  262. /*拖拽列*/
  263. .vxe-table-custom-popup--drag-line {
  264. display: none;
  265. position: absolute;
  266. top: 0;
  267. left: 0;
  268. z-index: 11;
  269. pointer-events: none;
  270. }
  271. .vxe-table-custom-popup--drag-line {
  272. width: 100%;
  273. height: 1px;
  274. border: 2px solid transparent;
  275. &[drag-pos="top"] {
  276. border-top-color: var(--vxe-ui-font-primary-color);
  277. }
  278. &[drag-pos="bottom"] {
  279. border-bottom-color: var(--vxe-ui-font-primary-color);
  280. }
  281. &[drag-to-child="y"] {
  282. border-top-color: transparent;
  283. border-bottom-color: transparent;
  284. border-left-color: var(--vxe-ui-status-success-color);
  285. }
  286. &.is--guides {
  287. background-color: var( --vxe-ui-table-drag-over-background-color);
  288. }
  289. }
  290. .vxe-table-custom-popup--drag-tip {
  291. display: none;
  292. position: absolute;
  293. top: 0;
  294. left: 0;
  295. padding: 0.6em 1.4em;
  296. max-width: 60%;
  297. min-width: 100px;
  298. border-radius: var(--vxe-ui-border-radius);
  299. overflow: hidden;
  300. text-overflow: ellipsis;
  301. white-space: nowrap;
  302. user-select: none;
  303. pointer-events: none;
  304. background-color: var(--vxe-ui-layout-background-color);
  305. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
  306. z-index: 33;
  307. &[drag-status="normal"] {
  308. .vxe-table-custom-popup--drag-tip-normal-status {
  309. display: block;
  310. }
  311. }
  312. &[drag-status="sub"] {
  313. .vxe-table-custom-popup--drag-tip-sub-status {
  314. display: block;
  315. }
  316. }
  317. &[drag-status="group"] {
  318. .vxe-table-custom-popup--drag-tip-group-status {
  319. display: block;
  320. }
  321. }
  322. &[drag-status="values"] {
  323. .vxe-table-custom-popup--drag-tip-values-status {
  324. display: block;
  325. }
  326. }
  327. &[drag-status="disabled"] {
  328. .vxe-table-custom-popup--drag-tip-disabled-status {
  329. display: block;
  330. }
  331. }
  332. }
  333. .vxe-table-custom-popup--drag-tip-wrapper {
  334. display: flex;
  335. flex-direction: row;
  336. align-items: center;
  337. }
  338. .vxe-table-custom-popup--drag-tip-status {
  339. padding-right: 0.4em;
  340. }
  341. .vxe-table-custom-popup--drag-tip-disabled-status {
  342. display: none;
  343. flex-shrink: 0;
  344. color: var(--vxe-ui-status-error-color)
  345. }
  346. .vxe-table-custom-popup--drag-tip-normal-status,
  347. .vxe-table-custom-popup--drag-tip-sub-status,
  348. .vxe-table-custom-popup--drag-tip-group-status,
  349. .vxe-table-custom-popup--drag-tip-values-status {
  350. display: none;
  351. }
  352. .vxe-table-custom-popup--drag-tip-content {
  353. flex-grow: 1;
  354. overflow: hidden;
  355. text-overflow: ellipsis;
  356. white-space: nowrap;
  357. }
  358. .vxe-table-custom-popup--name {
  359. display: flex;
  360. flex-direction: row;
  361. align-items: center;
  362. }
  363. .vxe-table-custom-popup--title {
  364. flex-grow: 1;
  365. overflow: hidden;
  366. text-overflow: ellipsis;
  367. white-space: nowrap;
  368. }
  369. @for $index from 2 to 10 {
  370. $paddingLeft: ($index - 1) * 24px;
  371. .vxe-table-custom-popup--row {
  372. &.level--#{$index} {
  373. .vxe-table-custom-popup--name {
  374. padding-left: $paddingLeft;
  375. }
  376. }
  377. }
  378. }
  379. .vxe-table-custom-popup--column-item {
  380. position: relative;
  381. &.col--visible,
  382. &.col--resizable,
  383. &.col--fixed {
  384. text-align: center;
  385. }
  386. &.col--resizable {
  387. & > .vxe-input,
  388. & > .vxe-number-input {
  389. width: 100%;
  390. }
  391. }
  392. }
  393. .vxe-table-custom-popup--row {
  394. &.active--drag-origin {
  395. .vxe-table-custom-popup--column-item {
  396. opacity: 0.5;
  397. }
  398. }
  399. &.active--drag-target {
  400. &[drag-pos="top"] {
  401. .vxe-table-custom-popup--column-item {
  402. &::after {
  403. display: block;
  404. top: -2px;
  405. }
  406. }
  407. }
  408. &[drag-pos="bottom"] {
  409. .vxe-table-custom-popup--column-item {
  410. &::after {
  411. display: block;
  412. bottom: -2px;
  413. }
  414. }
  415. }
  416. }
  417. &:first-child {
  418. &[drag-pos="top"] {
  419. .vxe-table-custom-popup--column-item {
  420. &::after {
  421. top: 0;
  422. }
  423. }
  424. }
  425. }
  426. &:last-child {
  427. &[drag-pos="bottom"] {
  428. .vxe-table-custom-popup--column-item {
  429. &::after {
  430. bottom: 0;
  431. }
  432. }
  433. }
  434. }
  435. }
  436. .vxe-table-custom-popup--column-item {
  437. &::after {
  438. display: none;
  439. content: "";
  440. position: absolute;
  441. left: -1px;
  442. width: calc(100% + 1px);
  443. height: 2px;
  444. background-color: var(--vxe-ui-font-primary-color);
  445. z-index: 12;
  446. }
  447. &:last-child {
  448. &::after {
  449. width: 100%;
  450. }
  451. }
  452. }
  453. .vxe-table-custom--list-move {
  454. transition-property: transform;
  455. transition-duration: 0.35s;
  456. transition-delay: 0.05s;
  457. }
  458. .vxe-table-custom-popup--column-sort-placeholder {
  459. padding: 0.2em 0.5em;
  460. }
  461. .vxe-table-custom-popup--column-sort-btn {
  462. font-size: 1.2em;
  463. padding: 0.2em 0.5em;
  464. &:not(.is--disabled) {
  465. cursor: grab;
  466. &:hover {
  467. color: var(--vxe-ui-font-primary-color);
  468. }
  469. &:active {
  470. cursor: grabbing;
  471. }
  472. }
  473. &.is--disabled {
  474. color: var(--vxe-ui-input-disabled-color);
  475. cursor: not-allowed;
  476. }
  477. }
  478. .vxe-table-custom-popup--table-sort-help-title,
  479. .vxe-table-custom-popup--table-sort-help-icon {
  480. vertical-align: middle;
  481. }
  482. .vxe-table-custom-popup--table-sort-help-icon {
  483. margin-left: 5px;
  484. cursor: help;
  485. }
  486. .vxe-table-custom-popup--table-col-seq {
  487. width: 80px;
  488. }
  489. .vxe-table-custom-popup--table-col-sort {
  490. width: 80px;
  491. }
  492. .vxe-table-custom-popup--table-col-title {
  493. min-width: 120px;
  494. }
  495. .vxe-table-custom-popup--table-col-width {
  496. width: 140px;
  497. }
  498. .vxe-table-custom-popup--table-col-fixed {
  499. width: 200px;
  500. }