shineout 1.11.4-beta.1 → 1.11.4-beta.2

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.
@@ -147,7 +147,8 @@ function (_PureComponent) {
147
147
  _proto.handleChange = function handleChange(e, clearClick) {
148
148
  var _this$props4 = this.props,
149
149
  type = _this$props4.type,
150
- clearable = _this$props4.clearable;
150
+ clearable = _this$props4.clearable,
151
+ coin = _this$props4.coin;
151
152
 
152
153
  if (clearClick) {
153
154
  this.ref.focus();
@@ -164,6 +165,10 @@ function (_PureComponent) {
164
165
  if (type === 'number') {
165
166
  if (typeof value !== 'number') {
166
167
  value = String(value).replace(/。/g, '.');
168
+
169
+ if (coin) {
170
+ value = value.replaceAll(',', '');
171
+ }
167
172
  }
168
173
 
169
174
  if (!this.isValidNumber(value)) {
@@ -256,7 +261,8 @@ function (_PureComponent) {
256
261
  inputFocus = _this$props7.inputFocus,
257
262
  clearToUndefined = _this$props7.clearToUndefined,
258
263
  placeholder = _this$props7.placeholder,
259
- other = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["type", "defaultValue", "digits", "className", "clearable", "htmlName", "forceChange", "onEnterPress", "forwardedRef", "innerTitle", "inputFocus", "clearToUndefined", "placeholder"]);
264
+ coin = _this$props7.coin,
265
+ other = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["type", "defaultValue", "digits", "className", "clearable", "htmlName", "forceChange", "onEnterPress", "forwardedRef", "innerTitle", "inputFocus", "clearToUndefined", "placeholder", "coin"]);
260
266
  var value = this.props.value == null || this.props.value === undefined ? '' : this.props.value;
261
267
  var needClearUndefined = clearToUndefined && this.props.value !== undefined;
262
268
  var showClear = !other.disabled && clearable && (value !== '' || needClearUndefined);
@@ -315,7 +321,8 @@ Input.propTypes = {
315
321
  innerTitle: _propTypes.default.node,
316
322
  inputFocus: _propTypes.default.bool,
317
323
  clearToUndefined: _propTypes.default.bool,
318
- placeholder: _propTypes.default.string
324
+ placeholder: _propTypes.default.string,
325
+ coin: _propTypes.default.bool
319
326
  };
320
327
  Input.defaultProps = {
321
328
  type: 'text'
@@ -92,7 +92,7 @@ function (_PureComponent) {
92
92
 
93
93
  return _react.default.createElement("div", {
94
94
  className: (0, _styles.paginationClass)((0, _classname.getDirectionClass)('section'))
95
- }, txt[0], _react.default.createElement(_Input.default, {
95
+ }, txt[0] ? _react.default.createElement("span", null, txt[0]) : undefined, _react.default.createElement(_Input.default, {
96
96
  key: this.renderRequire,
97
97
  value: current,
98
98
  onChange: nofunc,
@@ -104,7 +104,7 @@ function (_PureComponent) {
104
104
  size: size,
105
105
  className: (0, _styles.paginationClass)(isSimple && 'simple-input'),
106
106
  delay: 400
107
- }), txt[1]);
107
+ }), txt[1] ? _react.default.createElement("span", null, txt[1]) : undefined);
108
108
  };
109
109
 
110
110
  return Jumper;
package/css/hoc/coin.js CHANGED
@@ -120,7 +120,8 @@ var _default = function _default(coinType) {
120
120
  onMouseUp: this.handleMouseUp,
121
121
  value: this.getValue(),
122
122
  onFocus: this.handleFocus,
123
- onBlur: this.handleBlur
123
+ onBlur: this.handleBlur,
124
+ coin: true
124
125
  }));
125
126
  };
126
127
 
package/css/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as utils from './utils'
3
3
 
4
4
  declare const __default: {
5
5
  utils: typeof utils,
6
- version: '1.11.4-beta.1'
6
+ version: '1.11.4-beta.2'
7
7
  }
8
8
 
9
9
  export default __default
package/css/index.js CHANGED
@@ -224,6 +224,6 @@ exports.Upload = _Upload.default;
224
224
  // Created by scripts/src-index.js.
225
225
  var _default = {
226
226
  utils: utils,
227
- version: '1.11.4-beta.1'
227
+ version: '1.11.4-beta.2'
228
228
  };
229
229
  exports.default = _default;