index.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. @import '~@/uni_modules/lime-style/index.scss';
  2. /* #ifdef uniVersion >= 4.75 */
  3. $use-css-var: true;
  4. /* #endif */
  5. $picker: #{$prefix}-picker;
  6. $picker-border-radius: create-var(picker-border-radius, $border-radius-xl);
  7. $picker-bg-color: create-var(picker-bg-color, $bg-color-container);
  8. $picker-toolbar-height: create-var(picker-toolbar-height, 58px);
  9. $picker-cancel-color: create-var(picker-cancel-color, $text-color-2);
  10. $picker-confirm-color: create-var(picker-confirm-color, $primary-color);
  11. $picker-button-font-size: create-var(picker-button-font-size, $font-size-md);
  12. $picker-title-font-size: create-var(picker-title-font-size, 18px);
  13. $picker-title-font-weight: create-var(picker-title-font-weight, 700);
  14. $picker-title-line-height: create-var(picker-title-line-height, 26px);
  15. $picker-title-color: create-var(picker-title-color, $text-color-1);
  16. $picker-group-height: create-var(picker-group-height, 200px);
  17. $picker-indicator-bg-color: create-var(picker-indicator-bg-color, $fill-4);
  18. $picker-indicator-border-radius: create-var(picker-indicator-border-radius, $spacer-tn);
  19. $picker-item-height: create-var(picker-item-height, 50px);
  20. $picker-item-active-color: create-var(picker-item-active-color, $text-color-1);
  21. $picker-loading-mask-color: create-var(picker-loading-mask-color, rgba(255,255,255,.9));
  22. $picker-loading-color: create-var(picker-loading-color, $primary-color);
  23. .#{$picker} {
  24. position: relative;
  25. background-color: $picker-bg-color;
  26. border-top-left-radius: $picker-border-radius;
  27. border-top-right-radius: $picker-border-radius;
  28. &__toolbar {
  29. display: flex;
  30. align-items: center;
  31. justify-content: space-between;
  32. // overflow: hidden;
  33. height: $picker-toolbar-height;
  34. flex-direction: row;
  35. position: relative;
  36. }
  37. &__title {
  38. /* #ifdef APP-ANDROID || APP-IOS */
  39. // 鸿蒙使用定位在弹窗里会导致样式不生效
  40. position: absolute;
  41. left: 50%;
  42. top: 50%;
  43. transform: translateX(-50%) translateY(-50%);
  44. /* #endif */
  45. text-align: center;
  46. overflow: hidden;
  47. white-space: nowrap;
  48. text-overflow: ellipsis;
  49. color: $picker-title-color;
  50. // line-height: $picker-toolbar-height;
  51. line-height: $picker-title-line-height;
  52. font-weight: $picker-title-font-weight;
  53. font-size: $picker-title-font-size;
  54. }
  55. &__cancel,
  56. &__confirm {
  57. white-space: nowrap;
  58. // position: absolute;
  59. /* #ifndef UNI-APP-X && APP */
  60. display: flex;
  61. align-items: center;
  62. justify-content: center;
  63. user-select: none;
  64. /* #endif */
  65. /* #ifdef APP-HARMONY */
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. /* #endif */
  70. font-size: $picker-button-font-size;
  71. line-height: $picker-toolbar-height;
  72. height: 100%;
  73. // padding: 0 $spacer;
  74. @include padding(0 $spacer);
  75. }
  76. &__cancel {
  77. // left: 0;
  78. margin-right: auto;
  79. color: $picker-cancel-color;
  80. }
  81. &__cancel-text {
  82. /* #ifdef APP-HARMONY */
  83. color: $picker-cancel-color;
  84. /* #endif */
  85. }
  86. &__confirm {
  87. margin-left: auto;
  88. color: $picker-confirm-color;
  89. // right: 0
  90. }
  91. &__confirm-text {
  92. /* #ifdef APP-HARMONY */
  93. color: $picker-confirm-color;
  94. /* #endif */
  95. }
  96. &__main {
  97. display: flex;
  98. height: $picker-group-height;
  99. flex-direction: row;
  100. // padding: 0 $spacer-xs;
  101. @include padding(0 $spacer-xs);
  102. }
  103. &__mask {
  104. }
  105. &__empty {
  106. pointer-events: none;
  107. justify-content: center;
  108. align-items: center;
  109. display: flex;
  110. position: absolute;
  111. top: 0;
  112. bottom: 0;
  113. left: 0;
  114. right: 0;
  115. z-index: 3;
  116. }
  117. &__loading {
  118. z-index: 3;
  119. // color: $picker-loading-color;
  120. background-color: $picker-loading-mask-color;
  121. // background-color: red;
  122. justify-content: center;
  123. align-items: center;
  124. display: flex;
  125. position: absolute;
  126. top: 0;
  127. bottom: 0;
  128. left: 0;
  129. right: 0
  130. }
  131. }