refactor(ui): 优化弹窗组件的点击关闭逻辑

-移除了 ModelManager 组件中不必要的 @click 事件处理
- 修改了 TemplateManager 组件中的 @click 事件处理,仅在查看模板时触发关闭
- 这些更改提高了用户体验,避免了在编辑模型或模板时意外点击导致的关闭
This commit is contained in:
linshen committed 2025-03-22 21:41:40 +08:00
1 parent 5ef4471125
commit c2b97b652b
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -87,8 +87,7 @@
<Teleport to="body">
<!-- 编辑模型弹窗 -->
<div v-if="isEditing"
class="fixed inset-0 z-[60] flex items-center justify-center overflow-y-auto"
@click="cancelEdit">
class="fixed inset-0 z-[60] flex items-center justify-center overflow-y-auto">
<div class="fixed inset-0 bg-black/60 backdrop-blur-sm"></div>
<div class="relative theme-manager-container w-full max-w-2xl m-4 z-10"
@@ -170,7 +169,7 @@
</div>
<!-- 添加模型弹窗 -->
<div v-if="showAddForm" class="fixed inset-0 z-[60] flex items-center justify-center overflow-y-auto" @click="showAddForm = false">
<div v-if="showAddForm" class="fixed inset-0 z-[60] flex items-center justify-center overflow-y-auto">
<div class="fixed inset-0 bg-black/60 backdrop-blur-sm"></div>
<div class="relative theme-manager-container w-full max-w-2xl m-4 z-10" @click.stop>
@@ -167,7 +167,7 @@
<!-- 查看/编辑模态框 -->
<div v-if="showAddForm || editingTemplate || viewingTemplate"
class="fixed inset-0 z-[60] flex items-center justify-center overflow-y-auto"
@click="cancelEdit">
@click="viewingTemplate ? cancelEdit() : null">
<div class="fixed inset-0 bg-black/60 backdrop-blur-sm"></div>
<div class="relative theme-manager-container w-full max-w-2xl m-4 z-10"