【优化】AI 切换对话,先回调成功再切换
							parent
							
								
									63638ce4a1
								
							
						
					
					
						commit
						8f2b81bb79
					
				| 
						 | 
					@ -144,13 +144,16 @@ const searchConversation = async (e) => {
 | 
				
			||||||
 * 对话 - 点击
 | 
					 * 对话 - 点击
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
const handleConversationClick = async (id: string) => {
 | 
					const handleConversationClick = async (id: string) => {
 | 
				
			||||||
  // 切换对话
 | 
					  // 过滤出选中的对话
 | 
				
			||||||
  activeConversationId.value = id
 | 
					 | 
				
			||||||
  const filterConversation = conversationList.value.filter(item => {
 | 
					  const filterConversation = conversationList.value.filter(item => {
 | 
				
			||||||
    return item.id === id
 | 
					    return item.id === id
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
  // 回调 onConversationClick
 | 
					  // 回调 onConversationClick
 | 
				
			||||||
  emits('onConversationClick', filterConversation[0])
 | 
					  const res = emits('onConversationClick', filterConversation[0])
 | 
				
			||||||
 | 
					  // 切换对话
 | 
				
			||||||
 | 
					  if (res) {
 | 
				
			||||||
 | 
					    activeConversationId.value = id
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue