perf: 优化文本选中区域

This commit is contained in:
pipipi-pikachu 2022-01-15 11:55:50 +08:00
parent 61679c8157
commit e2044636f6

View File

@ -42,6 +42,10 @@
@update="value => updateContent(value)"
@mousedown="$event => handleSelectElement($event, false)"
/>
<!-- 当字号过大且行高较小时会出现文字高度溢出的情况导致拖拽区域无法被选中因此添加了以下节点避免该情况 -->
<div class="drag-handler top"></div>
<div class="drag-handler bottom"></div>
</div>
</div>
</div>
@ -180,4 +184,17 @@ export default defineComponent({
position: relative;
}
}
.drag-handler {
height: 10px;
position: absolute;
left: 0;
right: 0;
&.top {
top: 0;
}
&.bottom {
bottom: 0;
}
}
</style>