diff --git a/docs/reference/plugin/plugins/request.md b/docs/reference/plugin/plugins/request.md index 92e3111c..9332ab33 100644 --- a/docs/reference/plugin/plugins/request.md +++ b/docs/reference/plugin/plugins/request.md @@ -41,7 +41,10 @@ export default { `base` 接口前缀。 -⚠️警告,这个字段将在下个版本废弃,推荐使用 [axios baseURL](https://github.com/axios/axios)。 +::: warning 即将废弃 +这个字段将在下个版本废弃,推荐使用 [axios baseURL](https://github.com/axios/axios)。 +::: + ### 运行时配置 在 `app.js` 中进行运行时配置。 @@ -139,22 +142,12 @@ request('/api/login', { }) ``` -### 请求节流 +### 请求节流(即将废弃) -```js -import {request} from '@fesjs/fes'; -request('/api/login', { - username: 'robby', - password: '123456' -}, { - throttle: 1000, // 1 秒内只能发起一次请求 -}).then((res) => { - // do something -}).catch((err) => { - // 处理异常 -}) -``` +::: warning 即将废弃 +因为 request 的请求总会有一个 promise 结果,要么成功,要么失败,和防抖、节流的语义不一致,防抖、节流只是函数的不执行 +::: ### 请求缓存 diff --git a/docs/zh/reference/plugin/plugins/request.md b/docs/zh/reference/plugin/plugins/request.md index 92e3111c..2bf13c29 100644 --- a/docs/zh/reference/plugin/plugins/request.md +++ b/docs/zh/reference/plugin/plugins/request.md @@ -41,7 +41,10 @@ export default { `base` 接口前缀。 -⚠️警告,这个字段将在下个版本废弃,推荐使用 [axios baseURL](https://github.com/axios/axios)。 +::: warning 即将废弃 +这个字段将在下个版本废弃,推荐使用 [axios baseURL](https://github.com/axios/axios)。 +::: + ### 运行时配置 在 `app.js` 中进行运行时配置。 @@ -139,22 +142,13 @@ request('/api/login', { }) ``` -### 请求节流 +### 请求节流(即将废弃) -```js -import {request} from '@fesjs/fes'; -request('/api/login', { - username: 'robby', - password: '123456' -}, { - throttle: 1000, // 1 秒内只能发起一次请求 -}).then((res) => { - // do something -}).catch((err) => { - // 处理异常 -}) -``` +::: warning 即将废弃 +因为 request 的请求总会有一个 promise 结果,要么成功,要么失败,和防抖、节流的语义不一致,防抖、节流只是函数的不执行 +::: + ### 请求缓存 diff --git a/packages/create-fes-app/package.json b/packages/create-fes-app/package.json index 06f3036e..b7541a8f 100644 --- a/packages/create-fes-app/package.json +++ b/packages/create-fes-app/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/create-fes-app", - "version": "2.0.7", + "version": "2.0.8", "description": "create a app base on fes.js", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-layout/package.json b/packages/fes-plugin-layout/package.json index d97bf066..df283082 100644 --- a/packages/fes-plugin-layout/package.json +++ b/packages/fes-plugin-layout/package.json @@ -1,6 +1,6 @@ { "name": "@fesjs/plugin-layout", - "version": "2.0.7", + "version": "2.0.8", "description": "@fesjs/plugin-layout", "main": "lib/index.js", "files": [ diff --git a/packages/fes-plugin-windicss/package.json b/packages/fes-plugin-windicss/package.json index 47fa6aca..03003384 100644 --- a/packages/fes-plugin-windicss/package.json +++ b/packages/fes-plugin-windicss/package.json @@ -1,10 +1,11 @@ { "name": "@fesjs/plugin-windicss", - "version": "2.0.1", + "version": "2.0.2", "description": "@fesjs/plugin-windicss", "main": "lib/index.js", "files": [ - "lib" + "lib", + "windi.config.js" ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1"