mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 15:05:27 +00:00
- 移除自定义文本编辑逻辑,交由 LogicFlow 和 TextNodeModel 处理 - TextNode.vue 简化为空容器,LogicFlow 自动渲染文本内容 - 保留 TextNodeModel.ts 用于配置文本样式和编辑行为 - 采用模型-视图分离架构,符合 LogicFlow 设计模式
31 lines
557 B
Vue
31 lines
557 B
Vue
<script setup lang="ts">
|
|
// LogicFlow 会自动处理文本节点的渲染和编辑
|
|
</script>
|
|
|
|
<template>
|
|
<div class="text-content">
|
|
<!-- LogicFlow 会自动渲染 text 内容 -->
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.text-content {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
outline: none;
|
|
word-break: break-word;
|
|
padding: 4px;
|
|
box-sizing: border-box;
|
|
cursor: text;
|
|
}
|
|
|
|
.text-content:focus {
|
|
background: rgba(64, 158, 255, 0.1);
|
|
border-radius: 2px;
|
|
}
|
|
</style>
|