Skip to content

Commit cd04b23

Browse files
committed
fix: update rich text style
1 parent 4771f39 commit cd04b23

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

frontend/src/style.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,7 @@ body {
183183
.ed-dialog {
184184
border-radius: 12px !important;
185185
}
186+
187+
.tox-tinymce-inline {
188+
z-index: 10 !important;
189+
}

frontend/src/views/dashboard/canvas/CanvasCore.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { t } = useI18n()
1616
const dashboardStore = dashboardStoreWithOut()
1717
const canvasLocked = ref(false) // Is the canvas movement locked, Default false
1818
const emits = defineEmits(['parentAddItemBox'])
19-
const { curComponentId, fullscreenFlag } = storeToRefs(dashboardStore)
19+
const { curComponentId, curComponent, fullscreenFlag } = storeToRefs(dashboardStore)
2020
let currentInstance: any
2121
const props = defineProps({
2222
canvasId: {
@@ -736,8 +736,12 @@ function containerMouseDown(e: MouseEvent) {
736736
}
737737
infoBox.value.startX = e.pageX
738738
infoBox.value.startY = e.pageY
739-
e.preventDefault()
740-
e.stopPropagation()
739+
if (isMainCanvas(props.canvasId) && curComponent.value?.editing) {
740+
// do SQtext
741+
} else {
742+
e.preventDefault()
743+
e.stopPropagation()
744+
}
741745
}
742746
743747
function getNowPosition(addSizeX: number, addSizeY: number, moveXSize: number, moveYSize: number) {

frontend/src/views/dashboard/canvas/CanvasShape.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { type CanvasItem } from '@/utils/canvas.ts'
3-
import { ref, toRefs, type PropType } from 'vue'
3+
import { ref, toRefs, type PropType, computed } from 'vue'
44
import ResizeHandle from '@/views/dashboard/canvas/ResizeHandle.vue'
55
import DragHandle from '@/views/dashboard/canvas/DragHandle.vue'
66
import ComponentBar from '@/views/dashboard/canvas/ComponentBar.vue'
@@ -55,6 +55,8 @@ const shapeClick = (e: MouseEvent) => {
5555
e.stopPropagation()
5656
e.preventDefault()
5757
}
58+
59+
const dragDandleValue = computed(() => props.canEdit && !props.configItem.editing)
5860
</script>
5961

6062
<template>
@@ -78,7 +80,7 @@ const shapeClick = (e: MouseEvent) => {
7880
:canvas-id="canvasId"
7981
@enlarge-view="() => emits('enlargeView')"
8082
></component-bar>
81-
<template v-if="canEdit">
83+
<template v-if="dragDandleValue">
8284
<drag-handle></drag-handle>
8385
</template>
8486
<slot></slot>

0 commit comments

Comments
 (0)