English | 简体中文
- 🚀 所有数据都具有响应式
- 🔄 轮询请求
- 🤖 自动处理错误重试
- 🗄 内置请求缓存
- 📠 完全使用 Typescript 编写,具有强大的类型提示
- 🍃 轻量化
- 📦 开箱即用
- 🔥 有趣的可交互文档
npm install vue-request
# or with yarn
yarn add vue-request
<script src="https://unpkg.com/vue-request"></script>
它将以 window.VueRequest.useRequest
暴露在全局
import { useRequest } from 'vue-request';
export default {
setup() {
const { data } = useRequest('api/user');
return () => <div>{data.value}</div>;
},
};
如果你有很酷的想法,欢迎提交 issue 以便我们讨论
- 文档
- 分页
- 加载更多
感谢他们为我们提供了灵感
MIT License © 2020-present AttoJS