@alicloud/alfa-react 1.5.9 → 1.5.10

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.
@@ -71,10 +71,10 @@ function createAlfaWidget(option) {
71
71
  * @param option
72
72
  * @returns
73
73
  */
74
- export function useAlfaWidget(option) {
74
+ export function useAlfaWidget(option, deps) {
75
75
  var App = useMemo(function () {
76
76
  return createAlfaWidget(option);
77
- }, []);
77
+ }, deps || [option === null || option === void 0 ? void 0 : option.name, option === null || option === void 0 ? void 0 : option.version]);
78
78
  return App;
79
79
  }
80
80
  export default createAlfaWidget;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '1.5.9';
1
+ export var version = '1.5.10';
@@ -82,10 +82,10 @@ function createAlfaWidget(option) {
82
82
  * @param option
83
83
  * @returns
84
84
  */
85
- function useAlfaWidget(option) {
85
+ function useAlfaWidget(option, deps) {
86
86
  var App = (0, _react.useMemo)(function () {
87
87
  return createAlfaWidget(option);
88
- }, []);
88
+ }, deps || [option === null || option === void 0 ? void 0 : option.name, option === null || option === void 0 ? void 0 : option.version]);
89
89
  return App;
90
90
  }
91
91
  var _default = createAlfaWidget;
package/lib/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = '1.5.9';
7
+ var version = '1.5.10';
8
8
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/alfa-react",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "Alfa Framework (React Version)",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -36,8 +36,8 @@
36
36
  "classnames": "^2.2.6",
37
37
  "crypto-js": "^4.1.1",
38
38
  "prop-types": "^15.8.1",
39
- "@alicloud/console-os-loader": "1.4.30",
40
- "@alicloud/alfa-core": "1.4.32"
39
+ "@alicloud/alfa-core": "1.4.32",
40
+ "@alicloud/console-os-loader": "1.4.30"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": ">=16.0.0"
@@ -27,5 +27,5 @@ declare function createAlfaApp<P = any>(option: AlfaFactoryOption): (() => null)
27
27
  * @param dep custom useMemo deps
28
28
  * @returns
29
29
  */
30
- export declare function useAlfaApp<P = any>(option: AlfaFactoryOption, deps: any[]): (() => null) | ((props: P & IProps) => JSX.Element);
30
+ export declare function useAlfaApp<P = any>(option: AlfaFactoryOption, deps?: any[]): (() => null) | ((props: P & IProps) => JSX.Element);
31
31
  export default createAlfaApp;
@@ -8,5 +8,5 @@ declare function createAlfaWidget<P = any>(option: AlfaFactoryOption): (() => nu
8
8
  * @param option
9
9
  * @returns
10
10
  */
11
- export declare function useAlfaWidget<P = any>(option: AlfaFactoryOption): (() => null) | ((props: P & IProps) => JSX.Element);
11
+ export declare function useAlfaWidget<P = any>(option: AlfaFactoryOption, deps?: any[]): (() => null) | ((props: P & IProps) => JSX.Element);
12
12
  export default createAlfaWidget;
@@ -1 +1 @@
1
- export declare const version = "1.5.9";
1
+ export declare const version = "1.5.10";