diff --git a/packages/antd-plus/CHANGELOG.md b/packages/antd-plus/CHANGELOG.md index e4bc4d91..3d132727 100644 --- a/packages/antd-plus/CHANGELOG.md +++ b/packages/antd-plus/CHANGELOG.md @@ -1,5 +1,13 @@ # @orca-fe/painter +## 0.3.5 + +### Patch Changes + +- Updated dependencies + - @orca-fe/hooks@1.10.0 + - @orca-fe/pocket@3.2.6 + ## 0.3.4 ### Patch Changes diff --git a/packages/antd-plus/package.json b/packages/antd-plus/package.json index b25fab27..f71c82a7 100644 --- a/packages/antd-plus/package.json +++ b/packages/antd-plus/package.json @@ -1,6 +1,6 @@ { "name": "@orca-fe/antd-plus", - "version": "0.3.4", + "version": "0.3.5", "description": "Transformer Container", "keywords": [ "react", @@ -36,9 +36,9 @@ "clear": "rimraf lib es" }, "dependencies": { - "@orca-fe/hooks": "^1.9.2", + "@orca-fe/hooks": "^1.10.0", "@orca-fe/jss-plugin-auto-prefix": "^0.0.1", - "@orca-fe/pocket": "^3.2.5", + "@orca-fe/pocket": "^3.2.6", "@orca-fe/simple-jss": "^0.0.3", "@orca-fe/tools": "^0.10.0", "ahooks": "^3.7.8", diff --git a/packages/hooks/CHANGELOG.md b/packages/hooks/CHANGELOG.md index b5417b45..64246329 100644 --- a/packages/hooks/CHANGELOG.md +++ b/packages/hooks/CHANGELOG.md @@ -1,5 +1,11 @@ # @orca-fe/hooks +## 1.10.0 + +### Minor Changes + +- feat: 增加 throwOnError 选项 + ## 1.9.2 ### Patch Changes diff --git a/packages/hooks/package.json b/packages/hooks/package.json index a81ebe85..12788014 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@orca-fe/hooks", - "version": "1.9.2", + "version": "1.10.0", "description": "React Hooks Collections", "keywords": [ "react", diff --git a/packages/hooks/src/useService.ts b/packages/hooks/src/useService.ts index c5ae2667..f041212a 100644 --- a/packages/hooks/src/useService.ts +++ b/packages/hooks/src/useService.ts @@ -58,6 +58,9 @@ export interface ContextOptions { /** 如果请求失败,是否维持之前的结果,默认为 true */ keepSuccessData?: boolean; + + /** 如果請求的結果是 Error 則視為拋出異常。 */ + throwOnError?: boolean; } export const UseServiceContext = React.createContext({}); @@ -138,6 +141,7 @@ export function useService=4.8.0' version: 5.1.3(react-dom@18.2.0)(react@18.2.0) '@orca-fe/hooks': - specifier: ^1.9.2 + specifier: ^1.10.0 version: link:../hooks '@orca-fe/jss-plugin-auto-prefix': specifier: ^0.0.1 version: 0.0.1(jss@10.10.0)(react@18.2.0) '@orca-fe/pocket': - specifier: ^3.2.5 + specifier: ^3.2.6 version: link:../pocket '@orca-fe/simple-jss': specifier: ^0.0.3 @@ -279,13 +279,13 @@ importers: specifier: ^4.7.0 version: 4.7.0(react-dom@18.2.0)(react@18.2.0) '@orca-fe/hooks': - specifier: ^1.9.2 + specifier: ^1.10.0 version: link:../hooks '@orca-fe/jss-plugin-auto-prefix': specifier: ^0.0.1 version: 0.0.1(jss@10.10.0)(react@18.2.0) '@orca-fe/pocket': - specifier: ^3.2.5 + specifier: ^3.2.6 version: link:../pocket '@orca-fe/simple-jss': specifier: ^0.0.3 @@ -294,7 +294,7 @@ importers: specifier: ^0.10.0 version: link:../tools '@orca-fe/transformer': - specifier: ^0.3.25 + specifier: ^0.3.26 version: link:../transformer ahooks: specifier: ^3.7.8 @@ -334,19 +334,19 @@ importers: specifier: ^4.7.0 version: 4.7.0(react-dom@18.2.0)(react@18.2.0) '@orca-fe/hooks': - specifier: ^1.9.2 + specifier: ^1.10.0 version: link:../hooks '@orca-fe/jss-plugin-auto-prefix': specifier: ^0.0.1 version: 0.0.1(jss@10.10.0)(react@18.2.0) '@orca-fe/painter': - specifier: ^1.4.39 + specifier: ^1.4.40 version: link:../painter '@orca-fe/pdfjs-dist-browserify': specifier: ^3.8.24 version: 3.8.24 '@orca-fe/pocket': - specifier: ^3.2.5 + specifier: ^3.2.6 version: link:../pocket '@orca-fe/simple-jss': specifier: ^0.0.3 @@ -401,7 +401,7 @@ importers: specifier: '>=4.7.0' version: 5.1.3(react-dom@18.2.0)(react@17.0.2) '@orca-fe/hooks': - specifier: ^1.9.2 + specifier: ^1.10.0 version: link:../hooks '@orca-fe/jss-plugin-auto-prefix': specifier: ^0.0.1 @@ -516,7 +516,7 @@ importers: packages/transformer: dependencies: '@orca-fe/hooks': - specifier: ^1.9.2 + specifier: ^1.10.0 version: link:../hooks '@orca-fe/jss-plugin-auto-prefix': specifier: ^0.0.1