728x90
오늘의 2시간 삽질
const users = ref([]);
(async () => {
const res = await axios.get("url 주소 ");
users.value = res.data;
console.log(res);
})()
return {
users,
}
How can I use async/await in the Vue 3.0 setup() function using Typescript
(This question has been answered for JavaScript, see below, but this question is specific for TypeScript, which behaves differently) I'm trying to use async functionality in Vue3.0 using typescript.
stackoverflow.com
728x90
'Front-End > Vue.js' 카테고리의 다른 글
vue 부트스트랩 페이지네이션 가운데 정렬 (0) | 2023.07.24 |
---|---|
v-if v-else 에서 $refs 값이 나오지 않을 때 삽질중이라면 (0) | 2023.06.15 |
vue3 setup() onSubmit emit 사용하기 (0) | 2023.05.31 |
Vue.js 버튼에 클릭 이벤트 함수 여러개 달기 - 주의사항? (0) | 2021.11.04 |
Vue.js watch 사용 할 때 TypeError: Cannot read property 'pageClick' of undefined 에러 (0) | 2021.08.01 |