forked from Leaf/amber-ui
增加 再次点击取消选择
This commit is contained in:
parent
cf57fe9d44
commit
a742e6ae7e
@ -51,6 +51,13 @@ function update() {
|
||||
}
|
||||
|
||||
const changeAssistant = (id: number | undefined) => {
|
||||
|
||||
// 如果 id 相同,则取消选择
|
||||
if (id === chatStore.currentAssistantId) {
|
||||
chatStore.currentAssistantId = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (id) {
|
||||
chatStore.currentAssistantId = id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user