添加系统绑的功能
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user