728x90
반응형
Axios CDN
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
Axios 사용
axios.get("주소")
.then(resp=>{})
.catch(err=>{});
async loadList(){
const resp = await axios.get("http://localhost:8080/pocketmon/");
this.pocketmonList.push(...resp.data);
}
const resp = await axios.post("http://localhost:8080/pocketmon/", data);
Lodash CDN
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
쓰로틀링
keyword:_.throttle(함수, 시간)
디바운스
keyword:_.debounce(function(){코드}, 1000)
깊은복사
const copy = _.cloneDeep(resp.data);
this.pocketmonListCopy.push(...copy);
728x90
반응형
'학원 > VueJS' 카테고리의 다른 글
26_Vue CLI (0) | 2023.04.30 |
---|---|
23_VueJS (0) | 2023.04.16 |