mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-06-29 10:04:44 +08:00
Merge branch 'master' into fix-vite-html
This commit is contained in:
commit
0c103e65b9
18
CHANGELOG.md
18
CHANGELOG.md
@ -1,3 +1,21 @@
|
||||
## [3.0.18](https://github.com/WeBankFinTech/fes.js/compare/v3.0.17...v3.0.18) (2023-11-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 添加默认 responseType 配置 ([2e01629](https://github.com/WeBankFinTech/fes.js/commit/2e0162984a34f52e4f1f02be5d660105ea479986))
|
||||
|
||||
|
||||
|
||||
## [3.0.17](https://github.com/WeBankFinTech/fes.js/compare/v3.0.16...v3.0.17) (2023-10-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 优化依赖 ([#220](https://github.com/WeBankFinTech/fes.js/issues/220)) ([3e580db](https://github.com/WeBankFinTech/fes.js/commit/3e580dbed98c8b34faed7a504e8809d965693bc9))
|
||||
|
||||
|
||||
|
||||
## [3.0.16](https://github.com/WeBankFinTech/fes.js/compare/v3.0.15...v3.0.16) (2023-09-18)
|
||||
|
||||
|
||||
|
@ -46,18 +46,16 @@ export default defineRuntimeConfig({
|
||||
},
|
||||
// http 异常,和插件异常
|
||||
errorHandler(error) {
|
||||
if (error.response) {
|
||||
// 处理业务异常,例如上述 transformData 抛出的异常
|
||||
if (error.code) {
|
||||
console.log(error.msg)
|
||||
} else if (error.response) {
|
||||
// 请求成功发出且服务器也响应了状态码,但状态代码超出了 2xx 的范围
|
||||
console.log(error.response.data);
|
||||
console.log(error.response.status);
|
||||
console.log(error.response.headers);
|
||||
} else if (error.msg) {
|
||||
console.log(error.msg);
|
||||
console.log(`服务异常:${error.response.status}`)
|
||||
} else {
|
||||
// 发送请求时出了点问题
|
||||
console.log('Error', error.message);
|
||||
// 请求异常
|
||||
console.log(error.msg || error.message || `请求失败`)
|
||||
}
|
||||
console.log(error.config);
|
||||
},
|
||||
// 支持其他 fetch 配置
|
||||
...otherConfigs,
|
||||
|
@ -186,3 +186,10 @@ export default {
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## 2.x 升级到 3.x
|
||||
|
||||
1. 删除 dataField 配置,通过 dataHandler 实现类似功能,详情看上文案例
|
||||
2. errorHandler 改成了函数了,异常处理逻辑,查看上文案例
|
||||
3. 废弃 base 参数,用 baseURL
|
||||
4. 移除 skipErrorHandler 参数,直接传 errorHandler 可覆盖默认 errorHandler
|
||||
|
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fes.js",
|
||||
"version": "3.0.16",
|
||||
"version": "3.0.18",
|
||||
"description": "一个好用的前端管理台快速开发框架",
|
||||
"preferGlobal": true,
|
||||
"private": true,
|
||||
@ -30,7 +30,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"chalk": "^5.0.1",
|
||||
"conventional-changelog-cli": "^2.2.2",
|
||||
"conventional-changelog-cli": "^4.1.0",
|
||||
"enquirer": "^2.3.6",
|
||||
"execa": "^6.1.0",
|
||||
"minimist": "^1.2.6",
|
||||
@ -39,19 +39,17 @@
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
"@commitlint/config-conventional": "^11.0.0",
|
||||
"@vite-pwa/vitepress": "^0.0.5",
|
||||
"@webank/eslint-config-webank": "1.2.7",
|
||||
"chokidar": "^3.5.2",
|
||||
"commitizen": "^4.2.1",
|
||||
"chokidar": "^3.5.3",
|
||||
"commitizen": "^4.3.0",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fs-extra": "^11.1.1",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^13.2.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vite-plugin-pwa": "^0.14.7",
|
||||
"vitepress": "1.0.0-alpha.73",
|
||||
"vue": "^3.2.47",
|
||||
"vue": "^3.3.4",
|
||||
"yargs-parser": "^21.1.1"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/create-fes-app",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"description": "create a app base on fes.js",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
|
@ -1,6 +1,7 @@
|
||||
// fes.config.js 只负责管理 cli 相关的配置
|
||||
import { defineBuildConfig } from '@fesjs/fes';
|
||||
import pxtoviewport from '@ttou/postcss-px-to-viewport';
|
||||
import postcsspxtoviewport8plugin from 'postcss-px-to-viewport-8-plugin';
|
||||
|
||||
|
||||
export default defineBuildConfig({
|
||||
define: {
|
||||
@ -15,7 +16,7 @@ export default defineBuildConfig({
|
||||
ios: '10',
|
||||
},
|
||||
extraPostCSSPlugins: [
|
||||
pxtoviewport({
|
||||
postcsspxtoviewport8plugin({
|
||||
unitToConvert: 'px',
|
||||
viewportWidth: 375,
|
||||
unitPrecision: 5,
|
||||
|
@ -12,7 +12,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@webank/eslint-config-webank": "1.2.7",
|
||||
"@ttou/postcss-px-to-viewport": "^2.0.3"
|
||||
"postcss-px-to-viewport-8-plugin": "^1.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fesjs/fes": "^3.0.0",
|
||||
|
@ -19,8 +19,8 @@
|
||||
"dependencies": {
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@webank/eslint-config-webank": "1.2.7",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/builder-webpack",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"description": "@fesjs/builder-webpack",
|
||||
"main": "lib/index.js",
|
||||
"types": "types.d.ts",
|
||||
@ -26,20 +26,20 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.18.6",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.18.10",
|
||||
"@babel/plugin-proposal-function-bind": "^7.18.9",
|
||||
"@babel/plugin-proposal-pipeline-operator": "^7.18.9",
|
||||
"@babel/plugin-transform-runtime": "^7.21.0",
|
||||
"@babel/preset-env": "7.20.2",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
||||
"@babel/plugin-proposal-export-default-from": "^7.22.17",
|
||||
"@babel/plugin-proposal-function-bind": "^7.22.5",
|
||||
"@babel/plugin-proposal-pipeline-operator": "^7.22.15",
|
||||
"@babel/plugin-transform-runtime": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@babel/preset-typescript": "^7.23.2",
|
||||
"@fesjs/utils": "^3.0.1",
|
||||
"@vue/babel-plugin-jsx": "^1.1.1",
|
||||
"ajv": "^8.12.0",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-loader": "^9.1.2",
|
||||
"cli-highlight": "^2.1.4",
|
||||
"cli-highlight": "^2.1.11",
|
||||
"cliui": "^8.0.1",
|
||||
"connect-history-api-fallback": "^2.0.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
@ -66,7 +66,7 @@
|
||||
"webpackbar": "^5.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fesjs/fes": "^3.1.4",
|
||||
"@fesjs/fes": "^3.1.5",
|
||||
"core-js": "^3.29.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/compiler",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"description": "@fesjs/compiler",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -24,9 +24,9 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/register": "^7.21.0",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@babel/register": "^7.22.15",
|
||||
"@fesjs/utils": "^3.0.1",
|
||||
"commander": "^7.0.0",
|
||||
"dotenv": "8.2.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/plugin-jest",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"description": "@fesjs/plugin-jest",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -30,11 +30,11 @@
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fesjs/fes": "^3.1.4"
|
||||
"@fesjs/fes": "^3.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.21.3",
|
||||
"@babel/preset-env": "^7.15.0",
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@vue/babel-plugin-jsx": "^1.0.6",
|
||||
"babel-jest": "^29.0.0",
|
||||
"jest": "^29.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/plugin-request",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"description": "@fesjs/plugin-request",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
|
@ -9,6 +9,7 @@ function getRequestInstance() {
|
||||
type: ApplyPluginsType.modify,
|
||||
initialValue: {
|
||||
timeout: 10000,
|
||||
responseType: 'json',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/plugin-windicss",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "@fesjs/plugin-windicss",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
@ -28,11 +28,11 @@
|
||||
"access": "public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fesjs/fes": "^3.0.0",
|
||||
"@fesjs/fes": "^3.1.5",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"dependencies": {
|
||||
"vite-plugin-windicss": "^1.8.3",
|
||||
"vite-plugin-windicss": "^1.9.1",
|
||||
"windicss": "^3.5.1",
|
||||
"windicss-webpack-plugin": "^1.6.0"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/preset-built-in",
|
||||
"version": "3.1.4",
|
||||
"version": "3.1.5",
|
||||
"description": "@fesjs/preset-built-in",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@ -26,10 +26,10 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fesjs/compiler": "^3.0.1",
|
||||
"@fesjs/compiler": "^3.0.2",
|
||||
"@fesjs/utils": "^3.0.1",
|
||||
"@fesjs/runtime": "^3.0.0",
|
||||
"@vue/compiler-sfc": "^3.2.47",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"envinfo": "^7.7.3",
|
||||
"express": "^4.17.3",
|
||||
"mockjs": "^1.1.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// fes.config.js 只负责管理 cli 相关的配置
|
||||
import pxtoviewport from '@ttou/postcss-px-to-viewport';
|
||||
import pxtoviewport from 'postcss-px-to-viewport-8-plugin';
|
||||
import { defineBuildConfig } from '@fesjs/fes';
|
||||
|
||||
export default defineBuildConfig({
|
||||
|
@ -40,7 +40,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ttou/postcss-px-to-viewport": "^2.0.3",
|
||||
"postcss-px-to-viewport-8-plugin": "^1.2.3",
|
||||
"@fesjs/fes": "workspace:*",
|
||||
"@fesjs/plugin-icon": "workspace:*",
|
||||
"@fesjs/plugin-request": "workspace:*",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/fes",
|
||||
"version": "3.1.4",
|
||||
"version": "3.1.5",
|
||||
"description": "一个好用的前端管理台快速开发框架",
|
||||
"preferGlobal": true,
|
||||
"scripts": {
|
||||
@ -38,8 +38,8 @@
|
||||
"strong"
|
||||
],
|
||||
"dependencies": {
|
||||
"@fesjs/compiler": "^3.0.1",
|
||||
"@fesjs/preset-built-in": "^3.1.4",
|
||||
"@fesjs/compiler": "^3.0.2",
|
||||
"@fesjs/preset-built-in": "^3.1.5",
|
||||
"@fesjs/runtime": "^3.0.0",
|
||||
"@fesjs/utils": "^3.0.1",
|
||||
"pirates": "^4.0.5",
|
||||
|
4454
pnpm-lock.yaml
generated
4454
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user