fix: auto fill apiURL when platform changed for ApiKey add page

This commit is contained in:
RockYang
2024-01-23 17:30:54 +08:00
parent a992a5b3b3
commit ec08c24dca
2 changed files with 4 additions and 3 deletions

View File

@@ -261,10 +261,10 @@ const changePlatform = () => {
}
}
if (platform !== null) {
if (item.value.type === "chat") {
item.value.api_url = platform.api_url
} else if (platform.img_url) {
if (item.value.type === "img" && platform.img_url) {
item.value.api_url = platform.img_url
} else {
item.value.api_url = platform.api_url
}
}