mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修复创建分组排序会错误的bug
This commit is contained in:
parent
f528eb29bc
commit
ac2fd67688
@ -614,7 +614,7 @@ export const useChartEditStore = defineStore({
|
|||||||
} else {
|
} else {
|
||||||
const group = historyData[0] as CreateComponentGroupType
|
const group = historyData[0] as CreateComponentGroupType
|
||||||
group.groupList.forEach(item => {
|
group.groupList.forEach(item => {
|
||||||
ids.push(item.id)
|
ids.unshift(item.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.setGroup(ids, false)
|
this.setGroup(ids, false)
|
||||||
@ -763,7 +763,7 @@ export const useChartEditStore = defineStore({
|
|||||||
// 高
|
// 高
|
||||||
groupAttr.b = b < y + h ? y + h : b
|
groupAttr.b = b < y + h ? y + h : b
|
||||||
|
|
||||||
targetList.push(item)
|
targetList.unshift(item)
|
||||||
historyList.push(toRaw(item))
|
historyList.push(toRaw(item))
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -809,7 +809,7 @@ export const useChartEditStore = defineStore({
|
|||||||
if (isHistory) chartHistoryStore.createUnGroupHistory(cloneDeep([targetGroup]))
|
if (isHistory) chartHistoryStore.createUnGroupHistory(cloneDeep([targetGroup]))
|
||||||
|
|
||||||
// 分离组件并还原位置属性
|
// 分离组件并还原位置属性
|
||||||
targetGroup.groupList.forEach(item => {
|
targetGroup.groupList.reverse().forEach(item => {
|
||||||
item.attr.x = item.attr.x + targetGroup.attr.x
|
item.attr.x = item.attr.x + targetGroup.attr.x
|
||||||
item.attr.y = item.attr.y + targetGroup.attr.y
|
item.attr.y = item.attr.y + targetGroup.attr.y
|
||||||
if (!callBack) {
|
if (!callBack) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user