toolbar.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /**Variable**/
  2. @import './base/checked.scss';
  3. /*toolbar*/
  4. .vxe-toolbar {
  5. position: relative;
  6. display: flex;
  7. flex-direction: row;
  8. align-items: center;
  9. color: $vxe-font-color;
  10. font-family: $vxe-font-family;
  11. background-color: $vxe-toolbar-background-color;
  12. &:after {
  13. content: "";
  14. display: block;
  15. clear: both;
  16. height: 0;
  17. overflow: hidden;
  18. visibility: hidden;
  19. }
  20. &.is--perfect {
  21. border: 1px solid $vxe-table-border-color;
  22. border-bottom-width: 0;
  23. background-color: $vxe-table-header-background-color;
  24. }
  25. &.is--loading {
  26. &:before {
  27. content: "";
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. width: 100%;
  32. height: 100%;
  33. z-index: $vxe-loading-z-index;
  34. user-select: none;
  35. background-color: $vxe-loading-background-color;
  36. }
  37. }
  38. .vxe-buttons--wrapper {
  39. flex-grow: 1;
  40. & > .vxe-button+.vxe-button--item,
  41. & > .vxe-button--item+.vxe-button,
  42. & > .vxe-button--item+.vxe-button--item {
  43. margin-left: 0.8em;
  44. }
  45. & > .vxe-button--item {
  46. display: inline-block;
  47. }
  48. }
  49. .vxe-tools--wrapper {
  50. & > .vxe-button+.vxe-tool--item,
  51. & > .vxe-tool--item+.vxe-button,
  52. & > .vxe-tool--item+.vxe-tool--item {
  53. margin-left: 0.8em;
  54. }
  55. & > .vxe-tool--item {
  56. display: inline-block;
  57. }
  58. }
  59. .vxe-tools--wrapper {
  60. & > .vxe-button {
  61. display: flex;
  62. align-items: center;
  63. justify-content: center;
  64. }
  65. }
  66. .vxe-tools--wrapper,
  67. .vxe-tools--operate {
  68. display: flex;
  69. flex-shrink: 0;
  70. align-items: center;
  71. }
  72. .vxe-custom--wrapper {
  73. position: relative;
  74. margin-left: 0.8em;
  75. &.is--active {
  76. & > .vxe-button {
  77. background-color: $vxe-toolbar-custom-active-background-color;
  78. border-radius: 50%;
  79. }
  80. .vxe-custom--option-wrapper {
  81. display: block;
  82. }
  83. }
  84. }
  85. .vxe-custom--option-wrapper {
  86. display: none;
  87. position: absolute;
  88. right: 2px;
  89. text-align: left;
  90. background-color: $vxe-toolbar-panel-background-color;
  91. z-index: 19;
  92. border: 1px solid $vxe-table-border-color;
  93. border-radius: $vxe-border-radius;
  94. box-shadow: 0 1px 6px rgba(0,0,0,.2);
  95. .vxe-custom--header {
  96. padding: 0.28em 0;
  97. font-weight: 700;
  98. border-bottom: 1px solid $vxe-table-popup-border-color;
  99. }
  100. .vxe-custom--body {
  101. padding: 0.2em 0;
  102. max-height: 17.6em;
  103. .vxe-custom--option {
  104. &:hover {
  105. background-color: $vxe-table-row-hover-background-color;
  106. }
  107. }
  108. }
  109. .vxe-custom--header,
  110. .vxe-custom--body {
  111. & > li {
  112. max-width: 16em;
  113. min-width: 12.5em;
  114. padding: 0.2em 1em 0.2em 2.3em;
  115. @for $i from 2 through 8 {
  116. $interval: $i - 1 + 0.2;
  117. &.level--#{$i}{
  118. padding-left: #{$interval + 2.3}em;
  119. .vxe-checkbox--icon {
  120. left: #{$interval + 0.6}em;
  121. }
  122. }
  123. }
  124. }
  125. }
  126. .vxe-custom--footer {
  127. border-top: 1px solid $vxe-table-popup-border-color;
  128. text-align: right;
  129. button {
  130. background-color: transparent;
  131. width: 50%;
  132. height: 2.5em;
  133. border: 0;
  134. color: $vxe-font-color;
  135. text-align: center;
  136. cursor: pointer;
  137. &:focus {
  138. outline: none;
  139. }
  140. &:hover {
  141. color: $vxe-primary-color;
  142. }
  143. }
  144. }
  145. }
  146. }
  147. .vxe-custom--option-wrapper .vxe-custom--header,
  148. .vxe-custom--option-wrapper .vxe-custom--body {
  149. list-style-type: none;
  150. overflow-x: hidden;
  151. overflow-y: auto;
  152. margin: 0;
  153. padding: 0;
  154. user-select: none;
  155. & > li {
  156. overflow: hidden;
  157. text-overflow: ellipsis;
  158. white-space: nowrap;
  159. }
  160. }
  161. .vxe-custom--option {
  162. @extend %XECheckbox;
  163. .vxe-checkbox--icon {
  164. left: 0.6em;
  165. top: 0.38em;
  166. }
  167. }
  168. .vxe-toolbar {
  169. font-size: $vxe-font-size;
  170. height: $vxe-toolbar-height-default;
  171. .vxe-custom--option {
  172. & > .vxe-checkbox--icon {
  173. font-size: $vxe-checkbox-font-size-default;
  174. }
  175. }
  176. &.size--medium {
  177. font-size: $vxe-font-size-medium;
  178. height: $vxe-toolbar-height-medium;
  179. .vxe-custom--option {
  180. & > .vxe-checkbox--icon {
  181. font-size: $vxe-checkbox-font-size-medium;
  182. }
  183. }
  184. }
  185. &.size--small {
  186. font-size: $vxe-font-size-small;
  187. height: $vxe-toolbar-height-small;
  188. .vxe-custom--option {
  189. & > .vxe-checkbox--icon {
  190. font-size: $vxe-checkbox-font-size-small;
  191. }
  192. }
  193. }
  194. &.size--mini {
  195. font-size: $vxe-font-size-mini;
  196. height: $vxe-toolbar-height-mini;
  197. .vxe-custom--option {
  198. & > .vxe-checkbox--icon {
  199. font-size: $vxe-checkbox-font-size-mini;
  200. }
  201. }
  202. }
  203. }