@gm-mobile/react 1.1.8 → 1.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-mobile/react",
3
- "version": "1.1.8",
3
+ "version": "1.1.12",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-mobile#readme",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@gm-common/number": "^2.2.9",
29
29
  "@gm-common/tool": "^2.2.9",
30
- "@gm-mobile/locales": "^1.1.8",
30
+ "@gm-mobile/locales": "^1.1.11",
31
31
  "classnames": "^2.2.6"
32
32
  },
33
- "gitHead": "132721224d0a0af5f7f932e2c1ae64a0f06042ae"
33
+ "gitHead": "6be0c5a0fc3a049330b084dfa5e945784e29c4b2"
34
34
  }
@@ -20,6 +20,7 @@ const Counter = ({
20
20
  disabled,
21
21
  getErrorMsg,
22
22
  className,
23
+ keyboardDefaultNone,
23
24
  ...rest
24
25
  }) => {
25
26
  const text2Number = (value) => {
@@ -97,7 +98,7 @@ const Counter = ({
97
98
  'm-counter-large': large,
98
99
  disabled,
99
100
  },
100
- className
101
+ className,
101
102
  )}
102
103
  >
103
104
  <div className='m-counter-icon' onClick={() => handleChange('minus')}>
@@ -108,7 +109,7 @@ const Counter = ({
108
109
  />
109
110
  </div>
110
111
  <KeyboardWrap
111
- defaultValue={value}
112
+ defaultValue={keyboardDefaultNone ? '' : value}
112
113
  title={title}
113
114
  min={min}
114
115
  max={max}
@@ -153,12 +154,15 @@ Counter.propTypes = {
153
154
  getErrorMsg: PropTypes.func,
154
155
  className: PropTypes.string,
155
156
  style: PropTypes.object,
157
+ /** 键盘默认值不跟随原值 */
158
+ keyboardDefaultNone: PropTypes.bool,
156
159
  }
157
160
 
158
161
  Counter.defaultProps = {
159
162
  value: '',
160
163
  min: 0,
161
164
  precision: 2,
165
+ keyboardDefaultNone: false,
162
166
  }
163
167
 
164
168
  export default Counter