@kdesigner/core 0.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/dist/index.cjs +2373 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +627 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2281 -0
- package/dist/index.js.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/package.json +81 -0
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @kdesigner/nexo
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
KDesigner 网络请求工具库 - 基于 axios 的强大 HTTP 客户端封装。
|
|
8
|
+
|
|
9
|
+
## ✨ 特性
|
|
10
|
+
|
|
11
|
+
- 🚀 **基于 axios** - 稳定可靠的底层请求实现
|
|
12
|
+
- 🛡️ **TypeScript 支持** - 完整的类型定义和类型推导
|
|
13
|
+
- 🔌 **拦截器支持** - 灵活的请求和响应拦截机制
|
|
14
|
+
- 📦 **开箱即用** - 预设常用配置,降低接入成本
|
|
15
|
+
- ⚙️ **高度可定制** - 支持多实例、多配置
|
|
16
|
+
- 🔄 **框架无关** - 可以在 Vue / React 等各种框架中使用
|
|
17
|
+
|
|
18
|
+
## 📦 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @kdesigner/nexo
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🚀 快速开始
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { createClient } from '@kdesigner/nexo'
|
|
28
|
+
|
|
29
|
+
// 创建实例
|
|
30
|
+
const api = createClient({
|
|
31
|
+
baseURL: 'https://api.example.com',
|
|
32
|
+
timeout: 10000
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// 发起请求
|
|
36
|
+
api.get('/users').then((response) => {
|
|
37
|
+
console.log(response.data)
|
|
38
|
+
})
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 🛠 开发指南
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# 构建
|
|
45
|
+
pnpm build
|
|
46
|
+
|
|
47
|
+
# 测试
|
|
48
|
+
pnpm test
|
|
49
|
+
|
|
50
|
+
# 代码检查
|
|
51
|
+
pnpm lint
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 📝 许可证
|
|
55
|
+
|
|
56
|
+
MIT
|