这是我的提取功能:
getAllCountries = async () => {
try {
const response = await fetch("https://restcountries.eu/rest/v2/all");
const result = response.json();
console.log(result);
this.countriesList = result;
} catch (error) {
console.log(error);
}
};
Run Code Online (Sandbox Code Playgroud)
为什么在那里登录了两个 Promise,以及如何访问 PromiseResult。我试过了,console.log(result[0])但没有用