assui 2.0.15 → 2.0.19

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 assui
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -5,7 +5,7 @@ export interface NumberInputProps {
5
5
  /** 输入数据的类型 */
6
6
  numberType?: 'int' | 'float';
7
7
  /** 精度,只对float有效 */
8
- precision: number;
8
+ precision?: number;
9
9
  /** 同html input属性功能 */
10
10
  maxLength?: number;
11
11
  /** 指定输入框展示值的格式 */
@@ -35,7 +35,6 @@ declare const NumberInput: {
35
35
  (props: NumberInputProps): JSX.Element;
36
36
  defaultProps: {
37
37
  numberType: string;
38
- precision: number;
39
38
  enableMinus: boolean;
40
39
  };
41
40
  };
@@ -92,7 +92,7 @@ var NumberInput = function NumberInput(props) {
92
92
  newNumber = filterFloat({
93
93
  value: newValue,
94
94
  preValue: "" + resultValue,
95
- precision: precision,
95
+ precision: precision !== null && precision !== void 0 ? precision : 2,
96
96
  enableMinus: enableMinus
97
97
  });
98
98
  }
@@ -140,7 +140,6 @@ var NumberInput = function NumberInput(props) {
140
140
 
141
141
  NumberInput.defaultProps = {
142
142
  numberType: INT,
143
- precision: 2,
144
143
  enableMinus: false
145
144
  };
146
145
  export default NumberInput;
@@ -5,7 +5,7 @@ export interface NumberInputProps {
5
5
  /** 输入数据的类型 */
6
6
  numberType?: 'int' | 'float';
7
7
  /** 精度,只对float有效 */
8
- precision: number;
8
+ precision?: number;
9
9
  /** 同html input属性功能 */
10
10
  maxLength?: number;
11
11
  /** 指定输入框展示值的格式 */
@@ -35,7 +35,6 @@ declare const NumberInput: {
35
35
  (props: NumberInputProps): JSX.Element;
36
36
  defaultProps: {
37
37
  numberType: string;
38
- precision: number;
39
38
  enableMinus: boolean;
40
39
  };
41
40
  };
@@ -142,7 +142,7 @@ var NumberInput = function NumberInput(props) {
142
142
  newNumber = utils_1.filterFloat({
143
143
  value: newValue,
144
144
  preValue: "" + resultValue,
145
- precision: precision,
145
+ precision: precision !== null && precision !== void 0 ? precision : 2,
146
146
  enableMinus: enableMinus
147
147
  });
148
148
  }
@@ -190,7 +190,6 @@ var NumberInput = function NumberInput(props) {
190
190
 
191
191
  NumberInput.defaultProps = {
192
192
  numberType: numberType_1.INT,
193
- precision: 2,
194
193
  enableMinus: false
195
194
  };
196
195
  exports["default"] = NumberInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.0.15",
3
+ "version": "2.0.19",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -33,7 +33,7 @@
33
33
  "@ahooksjs/use-url-state": "^2.5.8",
34
34
  "@tinymce/tinymce-react": "^3.13.0",
35
35
  "@types/react-beautiful-dnd": "^13.1.2",
36
- "a-icons": "^1.0.9",
36
+ "a-icons": "^1.0.11",
37
37
  "ahooks": "^2.10.9",
38
38
  "bignumber.js": "^9.0.1",
39
39
  "copy-to-clipboard": "^3.3.1",
@@ -69,5 +69,5 @@
69
69
  "node": ">=10.0.0"
70
70
  },
71
71
  "license": "MIT",
72
- "gitHead": "3885f1940da7d93def776c86530383639493a43f"
72
+ "gitHead": "65061faecdc8a77a225f3efbdf1bf57167d810b7"
73
73
  }