1
0
forked from Leaf/amber-ui

增加 再次点击取消选择

This commit is contained in:
Twilight 2024-09-18 16:13:20 +08:00
parent cf57fe9d44
commit a742e6ae7e

View File

@ -51,6 +51,13 @@ function update() {
} }
const changeAssistant = (id: number | undefined) => { const changeAssistant = (id: number | undefined) => {
// id
if (id === chatStore.currentAssistantId) {
chatStore.currentAssistantId = 0;
return;
}
if (id) { if (id) {
chatStore.currentAssistantId = id; chatStore.currentAssistantId = id;
} }