revert: 修复富文本无法进入编辑状态问题

This commit is contained in:
wangjiahao 2024-10-21 13:44:34 +08:00
parent f7406ad486
commit 51dfb8de76
3 changed files with 5 additions and 6 deletions

View File

@ -1586,7 +1586,7 @@ defineExpose({
@input="handleInput" @input="handleInput"
:dv-info="dvInfo" :dv-info="dvInfo"
:canvas-active="canvasActive" :canvas-active="canvasActive"
:show-position="'edit'" :show-position="'canvas'"
/> />
<component <component
v-else-if="item.component.includes('Svg')" v-else-if="item.component.includes('Svg')"

View File

@ -373,7 +373,7 @@ const resetSelect = (node?) => {
const computedCanEdit = computed<boolean>(() => { const computedCanEdit = computed<boolean>(() => {
return ( return (
['canvas', 'canvasDataV'].includes(showPosition.value) && ['canvas', 'canvasDataV', 'edit'].includes(showPosition.value) &&
editStatus.value && editStatus.value &&
canEdit.value === false && canEdit.value === false &&
!isError.value && !isError.value &&

View File

@ -144,10 +144,9 @@ const varStyle = computed(() => [
const init = () => { const init = () => {
timeId = setInterval(() => { timeId = setInterval(() => {
const outerId = const outerId = ['canvas', 'canvasDataV', 'edit'].includes(showPosition.value)
showPosition.value === 'edit' ? 'shape-id-' + element.value.id
? 'shape-id-' + element.value.id : 'wrapper-outer-id-' + element.value.id
: 'wrapper-outer-id-' + element.value.id
const componentOut = document.getElementById(outerId) const componentOut = document.getElementById(outerId)
if (componentOut && text.value) { if (componentOut && text.value) {
const textValue = text.value.clientWidth const textValue = text.value.clientWidth