perf: 移动端删除 chat 时,侧边栏应该收起

main
ChenZhaoYu 2 years ago
parent 73e12b1fdd
commit 9081b22ce9

@ -32,6 +32,8 @@ function handleEdit({ uuid }: Chat.History, isEdit: boolean, event?: MouseEvent)
function handleDelete(index: number, event?: MouseEvent | TouchEvent) { function handleDelete(index: number, event?: MouseEvent | TouchEvent) {
event?.stopPropagation() event?.stopPropagation()
chatStore.deleteHistory(index) chatStore.deleteHistory(index)
if (isMobile.value)
appStore.setSiderCollapsed(true)
} }
function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEvent) { function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEvent) {

Loading…
Cancel
Save