refactor: move delete button to left side of NodeEditor header
This commit is contained in:
@@ -57,12 +57,15 @@ function onBlur() {
|
|||||||
<Transition name="slide-right">
|
<Transition name="slide-right">
|
||||||
<div v-if="!store.nodeEditorCollapsed" class="ne-expanded">
|
<div v-if="!store.nodeEditorCollapsed" class="ne-expanded">
|
||||||
<div class="editor-header">
|
<div class="editor-header">
|
||||||
<h3>{{ scene ? scene.id : '全局配置' }}<span v-if="!scene && store.aiChanges?.globalFields?.length" class="global-diff-tag" :title="store.aiChanges.globalFields.join(', ')">● 已修改 {{ store.aiChanges.globalFields.length }} 字段</span></h3>
|
<div class="header-left">
|
||||||
|
<h3>{{ scene ? scene.id : '全局配置' }}</h3>
|
||||||
|
<button v-if="scene" class="icon-btn danger" @click="emit('deleteScene', scene.id)" title="删除场景">🗑</button>
|
||||||
|
<span v-if="!scene && store.aiChanges?.globalFields?.length" class="global-diff-tag" :title="store.aiChanges.globalFields.join(', ')">● 已修改 {{ store.aiChanges.globalFields.length }} 字段</span>
|
||||||
|
</div>
|
||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<span v-if="saved" class="saved-hint">已保存</span>
|
<span v-if="saved" class="saved-hint">已保存</span>
|
||||||
<span v-if="errorMsg" class="error-hint">JSON 错误: {{ errorMsg }}</span>
|
<span v-if="errorMsg" class="error-hint">JSON 错误: {{ errorMsg }}</span>
|
||||||
<button class="icon-btn" @click="store.nodeEditorCollapsed = true" title="折叠">▶</button>
|
<button class="icon-btn" @click="store.nodeEditorCollapsed = true" title="折叠">▶</button>
|
||||||
<button v-if="scene" class="icon-btn danger" @click="emit('deleteScene', scene.id)" title="删除场景">🗑</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -165,6 +168,13 @@ function onBlur() {
|
|||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.header-actions {
|
.header-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user