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.
- package/css/Input/Input.js +10 -3
- package/css/Pagination/Jumper.js +2 -2
- package/css/hoc/coin.js +2 -1
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +763 -608
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/es/Input/Input.js +10 -3
- package/es/Pagination/Jumper.js +2 -2
- package/es/hoc/coin.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/Input/Input.js +10 -3
- package/lib/Pagination/Jumper.js +2 -2
- package/lib/hoc/coin.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/css/Input/Input.js
CHANGED
|
@@ -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
|
-
|
|
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'
|
package/css/Pagination/Jumper.js
CHANGED
|
@@ -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
package/css/index.d.ts
CHANGED