优化移除源时的行为
parent
182f08d221
commit
66376daad4
|
@ -84,6 +84,7 @@ export default {
|
||||||
if (!api) return
|
if (!api) return
|
||||||
if (appSetting['common.apiSource'] == api.id) {
|
if (appSetting['common.apiSource'] == api.id) {
|
||||||
let backApi = apiSourceInfo.find(api => !api.disabled)
|
let backApi = apiSourceInfo.find(api => !api.disabled)
|
||||||
|
if (!backApi) backApi = userApi.list[0]
|
||||||
updateSetting({ 'common.apiSource': backApi?.id ?? '' })
|
updateSetting({ 'common.apiSource': backApi?.id ?? '' })
|
||||||
}
|
}
|
||||||
userApi.list = await removeUserApi([api.id])
|
userApi.list = await removeUserApi([api.id])
|
||||||
|
|
Loading…
Reference in New Issue