CN-430 fix: 修复卡死报递归错误的问题
This commit is contained in:
@@ -191,7 +191,6 @@ export default {
|
||||
this.scroll.prevent = true
|
||||
const clientHeight = e.target.clientHeight
|
||||
const currentScrollTop = e.target.scrollTop
|
||||
console.info(this.scroll.prevScrollTop, currentScrollTop)
|
||||
if (currentScrollTop > this.scroll.prevScrollTop) {
|
||||
// 向下滚动,若top在clientHeight内,则整屏滚动下去
|
||||
this.scroll.prevScrollTop = currentScrollTop
|
||||
@@ -205,11 +204,9 @@ export default {
|
||||
// 向上滚动,若top在clientHeight内,则滚动到最顶部
|
||||
this.scroll.prevScrollTop = currentScrollTop
|
||||
if (currentScrollTop < clientHeight) {
|
||||
// console.info('up', this.scroll.prevScrollTop, currentScrollTop)
|
||||
scrollToTop(e.target, 0, 200, 'up')
|
||||
setTimeout(() => {
|
||||
this.scroll.prevScrollTop = e.target.scrollTop
|
||||
// console.info('up2', this.scroll.prevScrollTop, currentScrollTop)
|
||||
}, 210)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ export default {
|
||||
gridLayoutShow: false,
|
||||
rowHeight: 40,
|
||||
copyDataList: [], // 所有的图表
|
||||
normalCopyDataList: [], // 非整屏滚动的图表
|
||||
noData: false, // no data
|
||||
tempDom: { height: '', width: '' },
|
||||
stepWidth: null,
|
||||
@@ -148,6 +149,9 @@ export default {
|
||||
}
|
||||
})
|
||||
this.copyDataList = [...this.copyDataList]
|
||||
this.normalCopyDataList = this.copyDataList.filter(function (item) {
|
||||
return item.y >= -1
|
||||
})
|
||||
this.emitter.emit('groupParentCalcHeight', { chart, childrenList: this.copyDataList })
|
||||
},
|
||||
groupParentCalcHeight (chart, childrenList) {
|
||||
@@ -159,9 +163,13 @@ export default {
|
||||
// 第二个是空隙,第三个是标题的高度
|
||||
parent.h = getGroupHeight(childrenList) + 0.4 + 1
|
||||
this.copyDataList = [...this.copyDataList]
|
||||
this.normalCopyDataList = this.copyDataList.filter(function (item) {
|
||||
return item.y >= -1
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
anchorPoint () {
|
||||
return function (chart) {
|
||||
@@ -171,11 +179,6 @@ export default {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
normalCopyDataList: function () {
|
||||
return this.copyDataList.filter(function (item) {
|
||||
return item.y >= 0
|
||||
})
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
@@ -211,6 +214,9 @@ export default {
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.copyDataList = JSON.parse(JSON.stringify(tempList))
|
||||
this.normalCopyDataList = this.copyDataList.filter(function (item) {
|
||||
return item.y >= -1
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.gridLayoutShow = true
|
||||
})
|
||||
@@ -219,6 +225,9 @@ export default {
|
||||
if (isGroup(item.type) && !item.firstShow) {
|
||||
item.firstShow = true
|
||||
this.copyDataList = [...this.copyDataList]
|
||||
this.normalCopyDataList = this.copyDataList.filter(function (item) {
|
||||
return item.y >= -1
|
||||
})
|
||||
this.emitter.emit('groupParentCalcHeight', { chart: item, childrenList: this.copyDataList })
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user