Merge pull request #701 from lunady/fix_scroll_shaking

fix scroll list shaking
This commit is contained in:
Aresn 2020-10-15 09:56:37 +08:00 committed by GitHub
commit 01aaf1d16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 2 deletions

View file

@ -55,7 +55,11 @@
loadingText: { loadingText: {
type: String type: String
}, },
distanceToEdge: [Number, Array] distanceToEdge: [Number, Array],
stopSlide: {
type: Boolean,
default: false
}
}, },
data() { data() {
const distanceToEdge = this.calculateProximityThreshold(); const distanceToEdge = this.calculateProximityThreshold();
@ -86,7 +90,12 @@
return `${prefixCls}-wrapper`; return `${prefixCls}-wrapper`;
}, },
scrollContainerClasses() { scrollContainerClasses() {
return `${prefixCls}-container`; return [
`${prefixCls}-container`,
{
[`${prefixCls}-container-loading`]: this.showBodyLoader && this.stopSlide
}
];
}, },
slotContainerClasses() { slotContainerClasses() {
return [ return [

View file

@ -12,6 +12,21 @@
overflow-y: scroll; overflow-y: scroll;
} }
@keyframes ani-stop-slide {
from {
overflow-y: hidden;
tansform:translateZ(0);
}
to {
overflow-y: scroll;
tansform:translateZ(0);
}
}
&-container-loading {
animation: ani-stop-slide 1.5s;
}
&-content { &-content {
opacity: 1; opacity: 1;
transition: opacity 0.5s; transition: opacity 0.5s;