diff --git a/frontend/src/stores/dashboard/dashboard.ts b/frontend/src/stores/dashboard/dashboard.ts index 854aa516..618219e0 100644 --- a/frontend/src/stores/dashboard/dashboard.ts +++ b/frontend/src/stores/dashboard/dashboard.ts @@ -38,7 +38,11 @@ export const dashboardStore = defineStore('dashboard', { setFullscreenFlag(val: boolean) { this.fullscreenFlag = val }, - setCurComponent(value: any) { + setCurComponent: function (value: any) { + if (!value && this.curComponent) { + // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment + this.curComponent.editing = false + } this.curComponent = value this.curComponentId = value && value.id ? value.id : null }, diff --git a/frontend/src/views/dashboard/canvas/CanvasCore.vue b/frontend/src/views/dashboard/canvas/CanvasCore.vue index cd43be39..e04b6687 100644 --- a/frontend/src/views/dashboard/canvas/CanvasCore.vue +++ b/frontend/src/views/dashboard/canvas/CanvasCore.vue @@ -735,10 +735,13 @@ function containerMouseDown(e: MouseEvent) { infoBox.value.startX = e.pageX infoBox.value.startY = e.pageY // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment - if (curComponent.value?.component !== 'SQText') { - e.preventDefault() - e.stopPropagation() - } + // if (curComponent.value?.component !== 'SQText') { + // e.preventDefault() + // e.stopPropagation() + // } + + e.preventDefault() + e.stopPropagation() } function getNowPosition(addSizeX: number, addSizeY: number, moveXSize: number, moveYSize: number) { diff --git a/frontend/src/views/dashboard/components/sq-text/index.vue b/frontend/src/views/dashboard/components/sq-text/index.vue index b66e120c..fe1ceb68 100644 --- a/frontend/src/views/dashboard/components/sq-text/index.vue +++ b/frontend/src/views/dashboard/components/sq-text/index.vue @@ -65,11 +65,6 @@ const init = reactive({ menubar: false, placeholder: '', inline: true, - setup: function (editor: any) { - editor.on('blur', function () { - configItem.value.editing = false - }) - }, }) const isDisabled = computed(() => props.disabled || !configItem.value.editing)