assui 2.0.128 → 2.0.131

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.
@@ -7,7 +7,7 @@ export interface ModalAction {
7
7
  export interface ButtonModalProps extends ModalProps {
8
8
  onClose?: () => void;
9
9
  onOpen?: () => void;
10
- trigger: React.ReactElement;
10
+ trigger?: React.ReactElement;
11
11
  children: React.ReactElement;
12
12
  }
13
13
  declare const ForwardRefButtonModal: React.ForwardRefExoticComponent<ButtonModalProps & React.RefAttributes<unknown>>;
@@ -8,8 +8,5 @@ export interface LabelNumberInputProps extends NumberInputProps {
8
8
  /** 组件dom id */
9
9
  id?: string;
10
10
  }
11
- declare const LabelNumberInput: {
12
- (props: LabelNumberInputProps): JSX.Element;
13
- Option: new (text?: string | undefined, value?: string | undefined, defaultSelected?: boolean | undefined, selected?: boolean | undefined) => HTMLOptionElement;
14
- };
11
+ declare const LabelNumberInput: (props: LabelNumberInputProps) => JSX.Element;
15
12
  export default LabelNumberInput;
@@ -113,5 +113,4 @@ var LabelNumberInput = function LabelNumberInput(props) {
113
113
  }, label)));
114
114
  };
115
115
 
116
- export default LabelNumberInput;
117
- LabelNumberInput.Option = Option;
116
+ export default LabelNumberInput;
@@ -5,9 +5,9 @@ export interface RcQrcodeProps {
5
5
  /** 生成二维码的值 */
6
6
  value: QRCodeSegment[] | string;
7
7
  /** qrcode的QRCodeRenderersOptions */
8
- options: QRCodeRenderersOptions;
8
+ options?: QRCodeRenderersOptions;
9
9
  /** 获取HTMLCanvasElement */
10
- getCanvasInstance: (result: HTMLCanvasElement) => void;
10
+ getCanvasInstance?: (result: HTMLCanvasElement) => void;
11
11
  }
12
12
  declare const RcQrcode: {
13
13
  (props: RcQrcodeProps): JSX.Element;
@@ -21,7 +21,8 @@ import useQrcode from './useQrcode';
21
21
 
22
22
  var RcQrcode = function RcQrcode(props) {
23
23
  var value = props.value,
24
- options = props.options;
24
+ options = props.options,
25
+ getCanvasInstance = props.getCanvasInstance;
25
26
  var domElRef = React.useRef(null);
26
27
  var defaultOptions = {
27
28
  errorCorrectionLevel: 'H',
@@ -39,7 +40,7 @@ var RcQrcode = function RcQrcode(props) {
39
40
  throw err;
40
41
  }
41
42
 
42
- props === null || props === void 0 ? void 0 : props.getCanvasInstance(result);
43
+ getCanvasInstance && getCanvasInstance(result);
43
44
  (_a = domElRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(result);
44
45
  });
45
46
  });
@@ -7,7 +7,7 @@ export interface ModalAction {
7
7
  export interface ButtonModalProps extends ModalProps {
8
8
  onClose?: () => void;
9
9
  onOpen?: () => void;
10
- trigger: React.ReactElement;
10
+ trigger?: React.ReactElement;
11
11
  children: React.ReactElement;
12
12
  }
13
13
  declare const ForwardRefButtonModal: React.ForwardRefExoticComponent<ButtonModalProps & React.RefAttributes<unknown>>;
@@ -8,8 +8,5 @@ export interface LabelNumberInputProps extends NumberInputProps {
8
8
  /** 组件dom id */
9
9
  id?: string;
10
10
  }
11
- declare const LabelNumberInput: {
12
- (props: LabelNumberInputProps): JSX.Element;
13
- Option: new (text?: string | undefined, value?: string | undefined, defaultSelected?: boolean | undefined, selected?: boolean | undefined) => HTMLOptionElement;
14
- };
11
+ declare const LabelNumberInput: (props: LabelNumberInputProps) => JSX.Element;
15
12
  export default LabelNumberInput;
@@ -131,5 +131,4 @@ var LabelNumberInput = function LabelNumberInput(props) {
131
131
  }, label)));
132
132
  };
133
133
 
134
- exports["default"] = LabelNumberInput;
135
- LabelNumberInput.Option = Option;
134
+ exports["default"] = LabelNumberInput;
@@ -5,9 +5,9 @@ export interface RcQrcodeProps {
5
5
  /** 生成二维码的值 */
6
6
  value: QRCodeSegment[] | string;
7
7
  /** qrcode的QRCodeRenderersOptions */
8
- options: QRCodeRenderersOptions;
8
+ options?: QRCodeRenderersOptions;
9
9
  /** 获取HTMLCanvasElement */
10
- getCanvasInstance: (result: HTMLCanvasElement) => void;
10
+ getCanvasInstance?: (result: HTMLCanvasElement) => void;
11
11
  }
12
12
  declare const RcQrcode: {
13
13
  (props: RcQrcodeProps): JSX.Element;
@@ -73,7 +73,8 @@ exports.useQrcode = useQrcode_1["default"];
73
73
 
74
74
  var RcQrcode = function RcQrcode(props) {
75
75
  var value = props.value,
76
- options = props.options;
76
+ options = props.options,
77
+ getCanvasInstance = props.getCanvasInstance;
77
78
  var domElRef = React.useRef(null);
78
79
  var defaultOptions = {
79
80
  errorCorrectionLevel: 'H',
@@ -91,7 +92,7 @@ var RcQrcode = function RcQrcode(props) {
91
92
  throw err;
92
93
  }
93
94
 
94
- props === null || props === void 0 ? void 0 : props.getCanvasInstance(result);
95
+ getCanvasInstance && getCanvasInstance(result);
95
96
  (_a = domElRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(result);
96
97
  });
97
98
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.0.128",
3
+ "version": "2.0.131",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -69,5 +69,5 @@
69
69
  "node": ">=10.0.0"
70
70
  },
71
71
  "license": "MIT",
72
- "gitHead": "8f68b73387f510284d6930b3c90cb1abef3402c5"
72
+ "gitHead": "24278cb26a1eec3b033e3fa024b730ca954b4eb3"
73
73
  }