Commit 4dafd6c7 by pangchong

style(editor): 优化条件类名换行格式

- 调整DocNodeRenderer组件中动态class绑定的换行格式以提升代码可读性
- 格式化BatchDeleteConfirmModal中map初始化代码的换行,使结构更清晰
parent 9612753d
...@@ -106,7 +106,11 @@ ...@@ -106,7 +106,11 @@
:data-node-id="`${node.id}-txt-${index}`" :data-node-id="`${node.id}-txt-${index}`"
contenteditable="true" contenteditable="true"
class="focus:outline-none px-0.5 rounded inline transition-all" class="focus:outline-none px-0.5 rounded inline transition-all"
:class="editorStore.selectedNodeId === `${node.id}-txt-${index}` ? 'ring-2 ring-primary ring-offset-1 bg-primary/10' : 'focus:bg-fill-3'" :class="
editorStore.selectedNodeId === `${node.id}-txt-${index}`
? 'ring-2 ring-primary ring-offset-1 bg-primary/10'
: 'focus:bg-fill-3'
"
@click.stop="editorStore.setSelectedNodeId(`${node.id}-txt-${index}`)" @click.stop="editorStore.setSelectedNodeId(`${node.id}-txt-${index}`)"
@blur="handleMixedTextBlur(index, $event)" @blur="handleMixedTextBlur(index, $event)"
v-text="item.text" v-text="item.text"
...@@ -153,7 +157,11 @@ ...@@ -153,7 +157,11 @@
:data-node-id="`${node.id}-txt-${index}`" :data-node-id="`${node.id}-txt-${index}`"
contenteditable="true" contenteditable="true"
class="focus:outline-none px-0.5 rounded inline transition-all" class="focus:outline-none px-0.5 rounded inline transition-all"
:class="editorStore.selectedNodeId === `${node.id}-txt-${index}` ? 'ring-2 ring-primary ring-offset-1 bg-primary/10' : 'focus:bg-fill-3'" :class="
editorStore.selectedNodeId === `${node.id}-txt-${index}`
? 'ring-2 ring-primary ring-offset-1 bg-primary/10'
: 'focus:bg-fill-3'
"
@click.stop="editorStore.setSelectedNodeId(`${node.id}-txt-${index}`)" @click.stop="editorStore.setSelectedNodeId(`${node.id}-txt-${index}`)"
@blur="handleMixedTextBlur(index, $event)" @blur="handleMixedTextBlur(index, $event)"
v-text="item.text" v-text="item.text"
......
...@@ -187,7 +187,10 @@ const partitionBatchDelete = (selectedNodeIds: string[], nodeMap: Map<string, { ...@@ -187,7 +187,10 @@ const partitionBatchDelete = (selectedNodeIds: string[], nodeMap: Map<string, {
// 获取或初始化父节点当前的剩余子节点列表 // 获取或初始化父节点当前的剩余子节点列表
if (!parentRemainingTagsMap.has(parentId)) { if (!parentRemainingTagsMap.has(parentId)) {
parentRemainingTagsMap.set(parentId, item.parent.children.map((c) => c.tagName)) parentRemainingTagsMap.set(
parentId,
item.parent.children.map((c) => c.tagName)
)
} }
const remaining = parentRemainingTagsMap.get(parentId)! const remaining = parentRemainingTagsMap.get(parentId)!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment