mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-25 10:56:34 +08:00
fix: 修改拖拽之后未选中的问题
This commit is contained in:
parent
ccf78c6dd2
commit
8ef13b6325
@ -26,11 +26,11 @@ export const handleDrop = async (e: DragEvent) => {
|
|||||||
drayDataString
|
drayDataString
|
||||||
)
|
)
|
||||||
// 创建新图表组件
|
// 创建新图表组件
|
||||||
let newComponent = await createComponent(dropData)
|
let newComponent:CreateComponentType = await createComponent(dropData)
|
||||||
|
|
||||||
newComponent.setPosition(e.offsetX - newComponent.attr.w / 2, e.offsetY - newComponent.attr.h / 2)
|
newComponent.setPosition(e.offsetX - newComponent.attr.w / 2, e.offsetY - newComponent.attr.h / 2)
|
||||||
chartEditStore.addComponentList(newComponent)
|
chartEditStore.addComponentList(newComponent)
|
||||||
|
chartEditStore.setTargetSelectChart(newComponent.id)
|
||||||
loadingFinish()
|
loadingFinish()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loadingError()
|
loadingError()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user