feat:冗余代码清理

This commit is contained in:
liailing1026
2026-01-14 17:54:00 +08:00
parent edb39d4c1f
commit 029df6b5a5
13 changed files with 290 additions and 485 deletions

View File

@@ -16,8 +16,8 @@ const configStore = useConfigStore()
const searchValue = ref('')
const triggerOnFocus = ref(true)
const isFocus = ref(false)
const hasAutoSearched = ref(false) // 防止重复自动搜索
const isExpanded = ref(false) // 控制搜索框是否展开
const hasAutoSearched = ref(false)
const isExpanded = ref(false)
// 解析URL参数
function getUrlParam(param: string): string | null {
@@ -29,7 +29,6 @@ const planReady = computed(() => {
return agentsStore.agentRawPlan.data !== undefined
})
const openAgentAllocationDialog = () => {
console.log('打开智能体分配弹窗')
agentsStore.openAgentAllocationDialog()
}
// 自动搜索函数
@@ -70,12 +69,12 @@ function handleBlur() {
// 重置文本区域高度到最小行数
function resetTextareaHeight() {
nextTick(() => {
// 修复:使用更可靠的方式获取textarea元素
// 获取textarea元素
const textarea =
document.querySelector('#task-container .el-textarea__inner') ||
document.querySelector('#task-container textarea')
if (textarea) {
if (textarea instanceof HTMLElement) {
// 强制设置最小高度
textarea.style.height = 'auto'
textarea.style.minHeight = '56px'
@@ -100,7 +99,7 @@ async function handleSearch() {
})
data['Collaboration Process'] = changeBriefs(data['Collaboration Process'])
agentsStore.setAgentRawPlan({ data })
console.log('agentsStore.agentRawPlan', agentsStore.agentRawPlan)
emit('search', searchValue.value)
} finally {
triggerOnFocus.value = true
@@ -182,7 +181,7 @@ onMounted(() => {
/>
</el-button>
</div>
<AssignmentButton v-dev-only v-if="planReady" @click="openAgentAllocationDialog" />
<AssignmentButton v-if="planReady" @click="openAgentAllocationDialog" />
</div>
</el-tooltip>
</template>