修改驾驶舱组件重复绑定问题

This commit is contained in:
guanj
2026-01-08 10:08:51 +08:00
parent 545e3836d1
commit 3db01fe32d
6 changed files with 28 additions and 40 deletions

View File

@@ -410,10 +410,15 @@ function dragEnd(row: any) {
}
// 保存
const onSubmit = () => {
layout.value = layout.value.filter(item => {
return item.y <= 6 && item.x <= 12
})
if (layout.value.length == 0) {
return ElMessage.warning('页面设计不能为空!')
}
let repeat = findDuplicateNames(layout.value) || []
console.log('🚀 ~ onSubmit ~ layout.value:', layout.value)
if (repeat.length > 0) {
return ElMessage.warning(repeat.join('、') + ' 组件重复,请删除重复组件!')
}