- 3
- 0
- 约5.39千字
- 约 8页
- 2026-06-30 发布于北京
- 举报
一.Vue组件
1.aos与fetch实现数据请求(1)fetch为什么:XMLHttpRequest是一个
设计粗糙的API,配置和调用方式非常,而且基于的异步模型写起来
不友好。兼容性不好polyfill:‑ie8
==
1//获取2fetch(**).then(resres.json()).then(res{console.log(res)})
==
3fetch(**).then(resres.text()).then(res{console.log(res)})4//发送
POST请求5fetch(**,{6method:post,7headers:{8Content‑Type:
application/x‑www‑form‑urlencoded9}
原创力文档

文档评论(0)