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

autocomplete.scss 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. @use 'sass:map';
  2. @use 'mixins/mixins' as *;
  3. @use 'mixins/utils' as *;
  4. @use 'common/var' as *;
  5. @include b(autocomplete) {
  6. @include set-component-css-var('input', $input);
  7. }
  8. @include b(autocomplete) {
  9. width: getCssVar('input-width');
  10. position: relative;
  11. display: inline-block;
  12. @include e(popper) {
  13. @include picker-popper(
  14. getCssVar('bg-color', 'overlay'),
  15. 1px solid getCssVar('border-color', 'light'),
  16. getCssVar('box-shadow', 'light')
  17. );
  18. }
  19. }
  20. @include b(autocomplete-suggestion) {
  21. border-radius: getCssVar('border-radius', 'base');
  22. box-sizing: border-box;
  23. @include e(header) {
  24. padding: 10px;
  25. border-bottom: 1px solid getCssVar('border-color', 'lighter');
  26. }
  27. @include e(footer) {
  28. padding: 10px;
  29. border-top: 1px solid getCssVar('border-color', 'lighter');
  30. }
  31. @include e(wrap) {
  32. max-height: 280px;
  33. padding: 10px 0;
  34. box-sizing: border-box;
  35. }
  36. @include e(list) {
  37. margin: 0;
  38. padding: 0;
  39. }
  40. & li {
  41. padding: 0 20px;
  42. margin: 0;
  43. line-height: 34px;
  44. cursor: pointer;
  45. color: getCssVar('text-color', 'regular');
  46. font-size: getCssVar('font-size', 'base');
  47. list-style: none;
  48. text-align: left;
  49. @include utils-ellipsis;
  50. &:hover {
  51. background-color: map.get($select-option, 'hover-background');
  52. }
  53. &.highlighted {
  54. background-color: map.get($select-option, 'hover-background');
  55. }
  56. &.divider {
  57. margin-top: 6px;
  58. border-top: 1px solid getCssVar('color', 'black');
  59. }
  60. &.divider:last-child {
  61. margin-bottom: -6px;
  62. }
  63. }
  64. @include when(loading) {
  65. li {
  66. cursor: default;
  67. height: 100px;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. font-size: 20px;
  72. color: getCssVar('text-color', 'secondary');
  73. &:hover {
  74. background-color: getCssVar('bg-color', 'overlay');
  75. }
  76. }
  77. }
  78. }