UNPKG

tdesign-mobile-vue

Version:
123 lines (106 loc) 2.48 kB
@import "../../../base.less"; @import "./_var.less"; .@{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; } &__title { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: @picker-title-color; line-height: @picker-title-line-height; font-weight: @picker-title-font-weight; font-size: @picker-title-font-size; } &__cancel, &__confirm { display: flex; align-items: center; justify-content: center; user-select: none; font-size: @picker-button-font-size; height: 100%; padding: 0 16px; } &__cancel { color: @picker-cancel-color; } &__confirm { color: @picker-confirm-color; } &__main { position: relative; display: flex; justify-content: center; padding-left: 32px; padding-right: 32px; } &__mask { position: absolute; left: 0; right: 0; z-index: 3; backface-visibility: hidden; pointer-events: none; height: 48px; &--top { top: 0; background: linear-gradient(180deg, @bg-color-container 0%, rgba(255, 255, 255, 0%) 100%); } &--bottom { bottom: 0; background: linear-gradient(180deg, @bg-color-container 0%, rgba(255, 255, 255, 0%) 100%); transform: matrix(1, 0, 0, -1, 0, 0); } } &__indicator { height: @picker-item-height; position: absolute; left: 16px; right: 16px; top: calc(@picker-group-height / 2 - @picker-item-height / 2); pointer-events: none; background-color: @picker-indicator-bg-color; border-radius: @picker-indicator-border-radius; } } .@{item} { margin: 0; padding: 0; list-style: none; // display: flex; &__group { // padding: 72px 0; box-sizing: border-box; height: @picker-group-height; overflow: hidden; flex: 1; z-index: 1; } &__item { margin: 0; padding: 0; text-align: center; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; height: @picker-item-height; line-height: @picker-item-height; color: @picker-item-color; &--active { color: @picker-item-active-color; font-weight: 600; } } }