Commit 654590da authored by tyyin lan's avatar tyyin lan

fix(首页): 历史记录全选状态不匹配

parent 14acb567
......@@ -42,9 +42,17 @@ const isSelectAllRecord = computed(() => {
getSessionHistoryRecordList()
})()
function getSessionHistoryRecordList() {
function getSessionHistoryRecordList(isCreateNewSessionCheck = false) {
fetchSessionHistoryRecordList<SessionHistoryRecordItem[]>().then((res) => {
sessionHistoryRecordList.value = res.data
if (
isCreateNewSessionCheck &&
props.currentSessionId &&
sessionHistoryRecordList.value.find((item) => item.dialogsId !== props.currentSessionId)
) {
emit('createNewSession')
}
})
}
......@@ -104,10 +112,9 @@ function handleRecordDelete() {
window.$message.success(t('common_module.delete_success_message'))
isHistoryListEdit.value = false
currentSelectHistoryRecordList.value = []
emit('createNewSession')
getSessionHistoryRecordList()
getSessionHistoryRecordList(true)
})
})
.catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment