添加系统绑的功能

This commit is contained in:
guanj
2026-01-05 16:34:42 +08:00
parent 75987c0c6f
commit d25f16bcc7
13 changed files with 502 additions and 401 deletions

View File

@@ -380,10 +380,11 @@ const drag = throttle(row => {
} catch (e) {}
Object.assign(item.state, {
top: mouseAt.y - parentRect.top,
left: mouseAt.x - parentRect.left
top: mouseAt.y - parentRect.top - 300,
left: mouseAt.x - parentRect.left - 180
})
const newPos = item.calcXY(mouseAt.y - parentRect.top, mouseAt.x - parentRect.left)
const newPos = item.calcXY(mouseAt.y - parentRect.top - 300, mouseAt.x - parentRect.left - 180)
if (mouseInGrid) {
gridLayout.value.dragEvent('dragstart', dropId, newPos.x, newPos.y, dragItem.h, dragItem.w)
@@ -441,7 +442,7 @@ const onSubmit = () => {
console.log(123, findDuplicateNames(layout.value))
let repeat = findDuplicateNames(layout.value) || []
if (repeat.length > 0) {
return ElMessage.warning(repeat.join('、')+' 组件重复,请删除重复组件!')
return ElMessage.warning(repeat.join('、') + ' 组件重复,请删除重复组件!')
}
// const maxValue = Math.max(...layout.value.map(item => item.y + item.h))