fix:修改group内最大y计算错误的问题 以及 group内的移动未被保存的问题
This commit is contained in:
@@ -93,7 +93,7 @@ export function getGroupHeight (arr) {
|
||||
arr.forEach((children, index) => {
|
||||
if (maxY == children.y) {
|
||||
lastItem.push(children)
|
||||
} else {
|
||||
} else if (maxY < children.y) {
|
||||
maxY = children.y
|
||||
lastItem = [children]
|
||||
}
|
||||
|
||||
@@ -184,12 +184,16 @@ export default {
|
||||
},
|
||||
changeGroupHeight (copyList, group, flag) {
|
||||
const height = getGroupHeight(copyList)
|
||||
console.log(copyList, group, flag)
|
||||
// console.log(height,copyList, group, flag)
|
||||
// console.log(this.$refs.layout)
|
||||
const groupFind = this.copyDataList.find(item => item.id === group.id)
|
||||
const groupFind = this.copyDataList.find(item => item.id == group.id)
|
||||
const groupFindndex = this.copyDataList.find(item => item.id == group.id)
|
||||
console.log(groupFind)
|
||||
if (group) {
|
||||
groupFind.height = groupFind.h = height + this.headerHPadding
|
||||
groupFind.children = copyList
|
||||
this.copyDataList = [...this.copyDataList]
|
||||
console.log(this.copyDataList)
|
||||
}
|
||||
if (flag) {
|
||||
this.copyDataList = [...this.copyDataList]
|
||||
@@ -243,7 +247,7 @@ export default {
|
||||
panelId: this.panelId,
|
||||
charts: charts
|
||||
}
|
||||
console.log(this.copyDataList)
|
||||
// console.log(this.copyDataList)
|
||||
this.$put('/visual/panel/chart/weights', params)
|
||||
}, 200)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user