[improvement] Picker: support Inertial rolling (#3331)

This commit is contained in:
流采
2019-05-22 16:33:35 +08:00
committed by neverland
parent 6d526b6c45
commit 21db7e57ad
11 changed files with 804 additions and 600 deletions
+16 -3
View File
@@ -55,12 +55,26 @@
position: absolute;
top: 50%;
left: 0;
z-index: 1;
z-index: 3;
width: 100%;
transform: translateY(-50%);
pointer-events: none;
}
&__mask {
position: absolute;
top: 0;
left: 0;
z-index: 2;
width: 100%;
height: 100%;
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, .8), hsla(0, 0%, 100%, .6)),
linear-gradient(0deg, hsla(0, 0%, 100%, .8), hsla(0, 0%, 100%, .6));
background-repeat: no-repeat;
background-position: top, bottom;
pointer-events: none;
}
&-column {
flex: 1;
overflow: hidden;
@@ -69,10 +83,9 @@
&__item {
padding: 0 5px;
color: @picker-option-text-color;
color: @picker-option-selected-text-color;
&--selected {
color: @picker-option-selected-text-color;
font-weight: 500;
}