优化移除源时的行为

pull/1686/head
lyswhut 2023-11-09 10:54:57 +08:00
parent 182f08d221
commit 66376daad4
1 changed files with 1 additions and 0 deletions

View File

@ -84,6 +84,7 @@ export default {
if (!api) return
if (appSetting['common.apiSource'] == api.id) {
let backApi = apiSourceInfo.find(api => !api.disabled)
if (!backApi) backApi = userApi.list[0]
updateSetting({ 'common.apiSource': backApi?.id ?? '' })
}
userApi.list = await removeUserApi([api.id])