mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-29 18:28:28 +08:00
fix: 粘贴坐标
This commit is contained in:
parent
7d6afbb0c1
commit
765634224f
@ -500,8 +500,8 @@ export const useChartEditStore = defineStore({
|
||||
}
|
||||
const parseHandle = (e: CreateComponentType | CreateComponentGroupType) => {
|
||||
e = cloneDeep(e)
|
||||
e.attr.x = this.getMousePosition.x + 30
|
||||
e.attr.y = this.getMousePosition.y + 30
|
||||
e.attr.x = this.getMousePosition.startX
|
||||
e.attr.y = this.getMousePosition.startY
|
||||
// 外层生成新 id
|
||||
e.id = getUUID()
|
||||
// 分组列表生成新 id
|
||||
@ -510,11 +510,11 @@ export const useChartEditStore = defineStore({
|
||||
item.id = getUUID()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return e
|
||||
}
|
||||
const isCut = recordCharts.type === HistoryActionTypeEnum.CUT
|
||||
const targetList = Array.isArray(recordCharts.charts) ? recordCharts.charts : [ recordCharts.charts ]
|
||||
const targetList = Array.isArray(recordCharts.charts) ? recordCharts.charts : [recordCharts.charts]
|
||||
// 多项
|
||||
targetList.forEach((e: CreateComponentType | CreateComponentGroupType) => {
|
||||
this.addComponentList(parseHandle(e), undefined, true)
|
||||
|
Loading…
Reference in New Issue
Block a user