fix: 修复编辑仪表板时,初始化和编辑视图返回组件位置可能变化的问题

This commit is contained in:
wangjiahao 2021-12-06 15:37:04 +08:00
parent 5f46845bc2
commit 334c4bd8aa

View File

@ -327,7 +327,7 @@ function init() {
const vm = this
recalcCellWidth.call(this)
resetPositionBox.call(this)
// initPosition(this)
initPosition(this)
let i = 0
const timeid = setInterval(function() {
if (i >= vm.yourList.length) {
@ -471,13 +471,11 @@ function removeItem(index) {
this.yourList.splice(index, 1, {})
}
// eslint-disable-next-line no-unused-vars
//
function initPosition(_this) {
_this.yourList.forEach(item => {
checkItemPosition.call(_this, item, {
x: item.x,
y: item.y
})
fillPositionBox.call(_this, item.y + item.sizey)
addItemToPositionBox.call(_this, item)
})
}