This commit is contained in:
wangwenzhang
2020-04-04 20:36:09 +08:00
parent 64859bb811
commit 6a3b460ac5

View File

@@ -66,6 +66,8 @@ export default {
} }
}, },
setPlaceHolder () { setPlaceHolder () {
this.showPlaceHolder = true
const instanceRect = this.getInstanceRect() const instanceRect = this.getInstanceRect()
this.stylePlaceHolder = { this.stylePlaceHolder = {
width: instanceRect.width, width: instanceRect.width,
@@ -76,8 +78,6 @@ export default {
if (this.defaultInstancePosition < this.offsetTop) { if (this.defaultInstancePosition < this.offsetTop) {
this.setFixedForInstance() this.setFixedForInstance()
this.showPlaceHolder = true
this.setPlaceHolder() this.setPlaceHolder()
} }
@@ -96,6 +96,7 @@ export default {
if (isArrivalDefault && this.affixStyle.position === 'fixed') { if (isArrivalDefault && this.affixStyle.position === 'fixed') {
this.affixStyle = {} this.affixStyle = {}
this.showPlaceHolder = false
this.stylePlaceHolder = {} this.stylePlaceHolder = {}
} }
} }