1
누구든지이 메서드에서 디 바운딩 전에 this.isLoading = true를 어떻게 실행할 수 있는지 알고 있습니까?디 바운스 전에 로딩 스피너 시뮬레이션
액시즈를 통해 비동기 호출을 할 때 애니메이션으로 로딩되는 로딩 스피너가 있어야합니다.
methods: {
searchAdminUsers: _.debounce(function(query) {
this.isLoading = true
axios.get('api/searchEmployees?format=json', { params: { q:query } })
.then(response => {
let data = response.data.map(item => (
{ text: `${item.FIRSTNAME} ${item.LASTNAME} - ${item.POSITION}`, id: item.ID }
))
this.options = data
this.isLoading = false
})
.catch(error => {
console.log(error)
})
}, 250)
}