Merge pull request #701 from lunady/fix_scroll_shaking
fix scroll list shaking
This commit is contained in:
commit
01aaf1d16b
2 changed files with 26 additions and 2 deletions
|
@ -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 [
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue