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"
:dv-info="dvInfo"
:canvas-active="canvasActive"
:show-position="'edit'"
:show-position="'canvas'"
/>
<component
v-else-if="item.component.includes('Svg')"

View File

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

View File

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