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