@import '~@/uni_modules/lime-style/index.scss'; /* #ifdef uniVersion >= 4.75 */ $use-css-var: true; /* #endif */ $picker: #{$prefix}-picker-view; $picker-border-radius: create-var(picker-border-radius, $border-radius-xl); $picker-bg-color: create-var(picker-bg-color, $bg-color-container); $picker-toolbar-height: create-var(picker-toolbar-height, 58px); $picker-cancel-color: create-var(picker-cancel-color, $text-color-2); $picker-confirm-color: create-var(picker-confirm-color, $primary-color); $picker-button-font-size: create-var(picker-button-font-size, $font-size-md); $picker-title-font-size: create-var(picker-title-font-size, 18px); $picker-title-font-weight: create-var(picker-title-font-weight, 700); $picker-title-line-height: create-var(picker-title-line-height, 26px); $picker-title-color: create-var(picker-title-color, $text-color-1); $picker-group-height: create-var(picker-group-height, 200px); $picker-indicator-bg-color: create-var(picker-indicator-bg-color, $fill-3); $picker-indicator-border-radius: create-var(picker-indicator-border-radius, $border-radius); $picker-indicator-margin: create-var(picker-indicator-margin, 10px); $picker-item-height: create-var(picker-item-height, 50px); $picker-item-active-color: create-var(picker-item-active-color, $text-color-1); $picker-loading-mask-color: create-var(picker-loading-mask-color, rgba(255,255,255,.9)); $picker-loading-color: create-var(picker-loading-color, $primary-color); // $item: #{$prefix}-picker-item; $picker-item-active-font-weight: create-var(picker-item-active-font-weight, 700); $picker-item-color: create-var(picker-item-color, $text-color-1); $picker-item-font-size: create-var(picker-item-font-size, $font-size-md); $picker-mask-top-color: create-var(picker-mask-top-color, white); $picker-mask-bottom-color: create-var(picker-mask-bottom-color, rgba(36, 36, 36, 0)); .#{$picker} { position: relative; background-color: $picker-bg-color; border-top-left-radius: $picker-border-radius; border-top-right-radius: $picker-border-radius; &__toolbar { display: flex; align-items: center; justify-content: space-between; // overflow: hidden; height: $picker-toolbar-height; flex-direction: row; position: relative; } &__title { /* #ifdef UNI-APP-X && APP */ position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); /* #endif */ text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: $picker-title-color; // line-height: $picker-toolbar-height; line-height: $picker-title-line-height; font-weight: $picker-title-font-weight; font-size: $picker-title-font-size; } &__cancel, &__confirm { white-space: nowrap; // position: absolute; /* #ifndef UNI-APP-X && APP */ display: flex; align-items: center; justify-content: center; user-select: none; /* #endif */ font-size: $picker-button-font-size; line-height: $picker-toolbar-height; height: 100%; // padding: 0 $spacer; @include padding(0 $spacer); } &__cancel { // left: 0; margin-right: auto; color: $picker-cancel-color; } &__confirm { margin-left: auto; color: $picker-confirm-color; // right: 0 } &__main { position: relative; display: flex; height: $picker-group-height; flex-direction: row; z-index: 2; // padding: 0 $spacer-xs; @include padding(0 $spacer-xs); } &__mask { } &__empty { pointer-events: none; justify-content: center; align-items: center; display: flex; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 3; } &__loading { z-index: 3; // color: $picker-loading-color; background-color: $picker-loading-mask-color; // background-color: red; justify-content: center; align-items: center; display: flex; position: absolute; top: 0; bottom: 0; left: 0; right: 0 } &__indicator{ position: absolute; background-color: $picker-indicator-bg-color; top: 50%; left: $picker-indicator-margin; right: $picker-indicator-margin; height: $picker-item-height; transform: translateY(-50%); z-index: -1; @include border-radius($picker-indicator-border-radius); } &__group { flex: 1; width: 100%; &-item { height: $picker-item-height; line-height: $picker-item-height; text-align: center; /* #ifndef UNI-APP-X && APP */ display: flex; justify-content: center; /* #endif */ transition-duration: 100ms; transition-property: font-weight, color; transition-timing-function: linear; font-weight: 400; color: $picker-item-color; font-size: $picker-item-font-size; white-space: nowrap; &--active { color: $picker-item-active-color; font-weight: $picker-item-active-font-weight; } } } &__indicator { /* #ifndef UNI-APP-X && APP */ height: $picker-item-height; &:after,&:before{ display: none; } /* #endif */ } }