feat; 首页 六方图 tootip样式调整

This commit is contained in:
zhangyu
2021-11-05 13:43:23 +08:00
parent 163f5deb36
commit 47c4d195f5
2 changed files with 243 additions and 79 deletions

View File

@@ -267,6 +267,7 @@ export default {
this.calcPosition(e)
},
calcPosition (e) {
console.log(e)
const boxWidth = this.boxWidth
const distance = this.fromType === 'asset' ? 300 : 50
const minus = (e.pageY - distance) + this.$refs.alertLabel.$el.offsetHeight - window.innerHeight
@@ -280,9 +281,11 @@ export default {
}
if (boxWidth / 2 > e.pageX - 200) {
this.assetData.position.left = e.pageX + 35
this.assetData.position.right = 0
this.LRTriangle = true
} else {
this.assetData.position.left = e.pageX - 35 - this.$refs.alertLabel.$el.offsetWidth
this.assetData.position.right = window.innerWidth - (e.pageX - 35)
this.assetData.position.left = 0
this.LRTriangle = false
}
},