mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 02:41:46 +08:00
This commit is contained in:
parent
fe87885d90
commit
0a79536a05
@ -16,7 +16,8 @@ const MOMENTUM_LIMIT_DISTANCE = 15;
|
|||||||
const [createComponent, bem] = createNamespace('picker-column');
|
const [createComponent, bem] = createNamespace('picker-column');
|
||||||
|
|
||||||
function getElementTranslateY(element) {
|
function getElementTranslateY(element) {
|
||||||
const { transform } = window.getComputedStyle(element);
|
const style = window.getComputedStyle(element);
|
||||||
|
const transform = style.transform || style.webkitTransform;
|
||||||
const translateY = transform.slice(7, transform.length - 1).split(', ')[5];
|
const translateY = transform.slice(7, transform.length - 1).split(', ')[5];
|
||||||
|
|
||||||
return Number(translateY);
|
return Number(translateY);
|
||||||
@ -228,7 +229,7 @@ export default createComponent({
|
|||||||
const wrapperStyle = {
|
const wrapperStyle = {
|
||||||
transform: `translate3d(0, ${this.offset + baseOffset}px, 0)`,
|
transform: `translate3d(0, ${this.offset + baseOffset}px, 0)`,
|
||||||
transitionDuration: `${this.duration}ms`,
|
transitionDuration: `${this.duration}ms`,
|
||||||
transitionProperty: this.duration ? 'transform' : 'none',
|
transitionProperty: this.duration ? 'all' : 'none',
|
||||||
lineHeight: `${itemHeight}px`
|
lineHeight: `${itemHeight}px`
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
linear-gradient(0deg, hsla(0, 0%, 100%, .9), hsla(0, 0%, 100%, .4));
|
linear-gradient(0deg, hsla(0, 0%, 100%, .9), hsla(0, 0%, 100%, .4));
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top, bottom;
|
background-position: top, bottom;
|
||||||
|
backface-visibility: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user