智慧水务管理系统 - 精河县供水工程综合管理平台

cascader-panel.scss 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. @use 'mixins/mixins' as *;
  2. @use 'mixins/var' as *;
  3. @use 'common/var' as *;
  4. @include b(cascader-panel) {
  5. @include set-component-css-var('cascader', $cascader);
  6. }
  7. @include b(cascader-panel) {
  8. display: flex;
  9. width: fit-content;
  10. border-radius: getCssVar('cascader-menu', 'radius');
  11. font-size: getCssVar('cascader-menu', 'font-size');
  12. @include when(bordered) {
  13. border: getCssVar('cascader-menu', 'border');
  14. border-radius: getCssVar('cascader-menu', 'radius');
  15. }
  16. }
  17. @include b(cascader-menu) {
  18. min-width: 180px;
  19. box-sizing: border-box;
  20. color: getCssVar('cascader-menu', 'text-color');
  21. border-right: getCssVar('cascader-menu', 'border');
  22. &:last-child {
  23. border-right: none;
  24. .#{$namespace}-cascader-node {
  25. padding-right: 20px;
  26. }
  27. }
  28. @include e(wrap) {
  29. // Raise the priority
  30. &.#{$namespace}-scrollbar__wrap {
  31. height: 204px;
  32. }
  33. }
  34. @include e(list) {
  35. position: relative;
  36. min-height: 100%;
  37. margin: 0;
  38. padding: 6px 0;
  39. list-style: none;
  40. box-sizing: border-box;
  41. &.#{$namespace}-vl__window {
  42. // for virtual scroll
  43. margin: 6px 0;
  44. padding: 0;
  45. ul {
  46. margin: 0;
  47. padding: 0;
  48. }
  49. }
  50. }
  51. @include e(hover-zone) {
  52. position: absolute;
  53. top: 0;
  54. left: 0;
  55. width: 100%;
  56. height: 100%;
  57. pointer-events: none;
  58. }
  59. @include e(empty-text) {
  60. position: absolute;
  61. top: 50%;
  62. left: 50%;
  63. transform: translate(-50%, -50%);
  64. display: flex;
  65. align-items: center;
  66. color: getCssVar('cascader', 'color-empty');
  67. .is-loading {
  68. margin-right: 2px;
  69. }
  70. }
  71. }
  72. @include b(cascader-node) {
  73. position: relative;
  74. display: flex;
  75. align-items: center;
  76. padding: 0 30px 0 20px;
  77. height: 34px;
  78. line-height: 34px;
  79. outline: none;
  80. box-sizing: border-box;
  81. &.is-selectable.in-active-path {
  82. color: getCssVar('cascader-menu', 'text-color');
  83. }
  84. &.in-active-path,
  85. &.is-selectable.in-checked-path,
  86. &.is-active {
  87. color: getCssVar('cascader-menu', 'selected-text-color');
  88. font-weight: bold;
  89. }
  90. &:not(.is-disabled) {
  91. cursor: pointer;
  92. &:hover,
  93. &:focus {
  94. background: getCssVar('cascader-node', 'background-hover');
  95. }
  96. }
  97. @include when(disabled) {
  98. color: getCssVar('cascader-node', 'color-disabled');
  99. cursor: not-allowed;
  100. }
  101. @include e(prefix) {
  102. position: absolute;
  103. left: 10px;
  104. }
  105. @include e(postfix) {
  106. position: absolute;
  107. right: 10px;
  108. }
  109. @include e(label) {
  110. flex: 1;
  111. text-align: left;
  112. padding: 0 8px;
  113. white-space: nowrap;
  114. overflow: hidden;
  115. text-overflow: ellipsis;
  116. }
  117. > .#{$namespace}-checkbox {
  118. margin-right: 0;
  119. }
  120. > .#{$namespace}-radio {
  121. margin-right: 0;
  122. .#{$namespace}-radio__label {
  123. padding-left: 0;
  124. }
  125. }
  126. }