forked from github/dataease
fix: 修复编辑仪表板时,初始化和编辑视图返回组件位置可能变化的问题
This commit is contained in:
parent
5f46845bc2
commit
334c4bd8aa
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user