mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
fix: 修复图层重命名点击画布区域Blur未触发问题
This commit is contained in:
parent
0df7211d40
commit
80211d8c84
@ -93,7 +93,9 @@ let nameEdit = ref(false)
|
||||
let editComponentId = ref('')
|
||||
let inputName = ref('')
|
||||
let nameInput = ref(null)
|
||||
let curEditComponent = null
|
||||
const editComponentName = item => {
|
||||
curEditComponent = curComponent.value
|
||||
editComponentId.value = `#component-label-${item.id}`
|
||||
nameEdit.value = true
|
||||
inputName.value = item.name
|
||||
@ -106,11 +108,12 @@ const closeEditComponentName = () => {
|
||||
if (!inputName.value || !inputName.value.trim()) {
|
||||
return
|
||||
}
|
||||
if (inputName.value.trim() === curComponent.value.name) {
|
||||
if (inputName.value.trim() === curEditComponent.name) {
|
||||
return
|
||||
}
|
||||
curComponent.value.name = inputName.value
|
||||
curEditComponent.name = inputName.value
|
||||
inputName.value = ''
|
||||
curEditComponent = null
|
||||
}
|
||||
|
||||
const lock = () => {
|
||||
|
@ -252,7 +252,7 @@ const handleMouseDown = e => {
|
||||
}
|
||||
// 如果没有选中组件 在画布上点击时需要调用 e.preventDefault() 防止触发 drop 事件
|
||||
if (!curComponent.value || isPreventDrop(curComponent.value.component)) {
|
||||
e.preventDefault()
|
||||
// e.preventDefault()
|
||||
}
|
||||
hideArea()
|
||||
const rectInfo = editorMap.value[canvasId.value].getBoundingClientRect()
|
||||
|
@ -385,9 +385,9 @@ const handleMouseDownOnShape = e => {
|
||||
nextTick(() => eventBus.emit('componentClick'))
|
||||
dvMainStore.setInEditorStatus(true)
|
||||
dvMainStore.setClickComponentStatus(true)
|
||||
if (isPreventDrop(element.value.component)) {
|
||||
e.preventDefault()
|
||||
}
|
||||
// if (isPreventDrop(element.value.component)) {
|
||||
// e.preventDefault()
|
||||
// }
|
||||
|
||||
e.stopPropagation()
|
||||
if (element.value['isLock'] || !isEditMode.value) return
|
||||
|
@ -113,7 +113,7 @@ const handleDragOver = e => {
|
||||
}
|
||||
|
||||
const handleMouseDown = e => {
|
||||
e.stopPropagation()
|
||||
// e.stopPropagation()
|
||||
dvMainStore.setClickComponentStatus(false)
|
||||
// 点击画布的空区域 提前清空curComponent 防止右击菜单内容抖动
|
||||
dvMainStore.setCurComponent({ component: null, index: null })
|
||||
|
Loading…
Reference in New Issue
Block a user