feat:任务大纲编辑文字悬浮边框重构

This commit is contained in:
liailing1026
2026-02-27 11:45:16 +08:00
parent c009db12a6
commit c14430cfae
6 changed files with 263 additions and 81 deletions

View File

@@ -7,15 +7,16 @@ import PlanModification from './components/Main/TaskTemplate/TaskSyllabus/Branch
import { useAgentsStore } from '@/stores/modules/agents'
import PlanTask from './components/Main/TaskTemplate/TaskProcess/components/PlanTask.vue'
import AgentAllocation from './components/Main/TaskTemplate/TaskSyllabus/components/AgentAllocation.vue'
import { Clock } from '@element-plus/icons-vue'
const isDarkMode = ref(false)
const agentsStore = useAgentsStore()
const mainRef = ref<{ currentTaskID: string } | null>(null)
const mainRef = ref<{ currentTaskID: string; openHistoryDialog: () => void } | null>(null)
// 获取当前的 taskId
const currentTaskId = computed(() => {
return mainRef.value?.currentTaskID || ''
})
// 打开历史记录
const openHistory = () => {
mainRef.value?.openHistoryDialog()
}
onMounted(() => {
// 等待 Main 组件挂载后获取 taskId
@@ -76,7 +77,23 @@ onMounted(() => {
<template>
<div class="h-full relative">
<!-- 主题切换按钮 - 放置在页面右上角 -->
<!-- 左上角按钮组 -->
<div class="absolute top-4 left-4 z-50 flex gap-3">
<!-- 历史记录按钮 -->
<button
@click="openHistory"
class="w-10 h-10 rounded-full transition-all duration-300 flex items-center justify-center"
:class="{
'bg-[#ebebeb] hover:bg-[var(--color-bg-hover)]': !isDarkMode,
'bg-[#0e131c] hover:bg-[var(--color-bg-hover)]': isDarkMode
}"
title="历史记录"
>
<el-icon size="20px"><Clock /></el-icon>
</button>
</div>
<!-- 右上角按钮 -->
<div class="absolute top-4 right-4 z-50">
<button
@click="toggleTheme"
@@ -107,7 +124,7 @@ onMounted(() => {
</div>
<Header />
<Main />
<Main ref="mainRef" />
<FloatWindow
v-if="agentsStore.planModificationWindow"