fix(IndexBar): fix the problem of rolling out parent boundaries when sucking bottom (#4218)

This commit is contained in:
流采
2019-08-24 16:01:55 +08:00
committed by neverland
parent a05a03b8b2
commit 689a579503
3 changed files with 22 additions and 8 deletions

View File

@@ -14,7 +14,8 @@ export default createComponent({
data() {
return {
top: 0,
active: false
active: false,
position: 'static'
};
},
@@ -26,9 +27,10 @@ export default createComponent({
anchorStyle() {
if (this.sticky) {
return {
position: this.position,
zIndex: `${this.parent.zIndex}`,
transform: `translate3d(0, ${this.top}px, 0)`,
color: this.parent.highlightColor,
zIndex: `${this.parent.zIndex}`
};
}
}