@ucloud-fe/react-components 1.3.0 → 1.3.4
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/CHANGELOG.md +31 -0
- package/dist/icon.min.js +1 -1
- package/dist/main.min.js +4 -4
- package/lib/components/Cascader/Cascader.d.ts +1 -1
- package/lib/components/Compact/Compact.js +6 -18
- package/lib/components/Input/Input.js +3 -6
- package/lib/components/LocaleProvider/LocaleProvider.js +1 -1
- package/lib/components/LocaleProvider/localeConsumerDecorator.js +1 -1
- package/lib/components/LocaleProvider/{locale/runtime.d.ts → runtime.d.ts} +1 -1
- package/lib/components/LocaleProvider/{locale/runtime.js → runtime.js} +0 -0
- package/lib/components/LocaleProvider/useLocale.js +1 -1
- package/lib/components/Message/Message.js +17 -24
- package/lib/components/Message/method.js +22 -4
- package/lib/components/Modal/Modal.js +12 -4
- package/lib/components/Modal/method.js +131 -57
- package/lib/components/Notice/Notice.js +15 -20
- package/lib/components/NumberInput/style/index.js +5 -5
- package/lib/components/Select/Select.js +6 -18
- package/lib/components/Table/Table.js +1 -6
- package/lib/components/Tag/style/index.js +12 -12
- package/lib/components/Upload/Upload.js +3 -2
- package/lib/utils/deprecatedLog.d.ts +1 -1
- package/lib/utils/deprecatedLog.js +8 -1
- package/lib/utils/warning.d.ts +4 -2
- package/lib/utils/warning.js +19 -4
- package/package.json +1 -1
|
@@ -80,11 +80,12 @@ var fileShape = _propTypes.default.shape({
|
|
|
80
80
|
previewUrl: _propTypes.default.string,
|
|
81
81
|
thumbnailUrl: _propTypes.default.string
|
|
82
82
|
});
|
|
83
|
+
|
|
84
|
+
var deprecatedLogForListTypeText = (0, _deprecatedLog.default)('listType text', 'list');
|
|
83
85
|
/**
|
|
84
86
|
* 文件上传控件
|
|
85
87
|
*/
|
|
86
88
|
|
|
87
|
-
|
|
88
89
|
var Upload = (_dec = (0, _localeConsumerDecorator.default)({
|
|
89
90
|
defaultLocale: _zh_CN.default,
|
|
90
91
|
localeName: 'Upload'
|
|
@@ -392,7 +393,7 @@ var Upload = (_dec = (0, _localeConsumerDecorator.default)({
|
|
|
392
393
|
}
|
|
393
394
|
|
|
394
395
|
if (props.listType === 'text') {
|
|
395
|
-
(
|
|
396
|
+
deprecatedLogForListTypeText();
|
|
396
397
|
}
|
|
397
398
|
|
|
398
399
|
_this.state = {
|
|
@@ -9,11 +9,18 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _newArrowCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/newArrowCheck"));
|
|
11
11
|
|
|
12
|
+
var _once = _interopRequireDefault(require("./once"));
|
|
13
|
+
|
|
12
14
|
var _this = void 0;
|
|
13
15
|
|
|
14
16
|
var deprecatedLog = function deprecatedLog(name, insteadName) {
|
|
17
|
+
var _this2 = this;
|
|
18
|
+
|
|
15
19
|
(0, _newArrowCheck2.default)(this, _this);
|
|
16
|
-
|
|
20
|
+
return (0, _once.default)(function () {
|
|
21
|
+
(0, _newArrowCheck2.default)(this, _this2);
|
|
22
|
+
console.error("URC Deprecated: ".concat(name, " will be deprecated, please use ").concat(insteadName, " to replace"));
|
|
23
|
+
}.bind(this));
|
|
17
24
|
}.bind(void 0);
|
|
18
25
|
|
|
19
26
|
var _default = deprecatedLog;
|
package/lib/utils/warning.d.ts
CHANGED
package/lib/utils/warning.js
CHANGED
|
@@ -5,15 +5,30 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.onceWarning = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _newArrowCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/newArrowCheck"));
|
|
11
11
|
|
|
12
|
+
var _once = _interopRequireDefault(require("./once"));
|
|
13
|
+
|
|
12
14
|
var _this = void 0;
|
|
13
15
|
|
|
14
|
-
var
|
|
16
|
+
var warning = function warning(msg) {
|
|
17
|
+
(0, _newArrowCheck2.default)(this, _this);
|
|
18
|
+
console.error("URC Warning: ".concat(msg));
|
|
19
|
+
}.bind(void 0);
|
|
20
|
+
|
|
21
|
+
var _default = warning;
|
|
22
|
+
exports.default = _default;
|
|
23
|
+
|
|
24
|
+
var onceWarning = function onceWarning(msg) {
|
|
25
|
+
var _this2 = this;
|
|
26
|
+
|
|
15
27
|
(0, _newArrowCheck2.default)(this, _this);
|
|
16
|
-
|
|
28
|
+
return (0, _once.default)(function () {
|
|
29
|
+
(0, _newArrowCheck2.default)(this, _this2);
|
|
30
|
+
return warning(msg);
|
|
31
|
+
}.bind(this));
|
|
17
32
|
}.bind(void 0);
|
|
18
33
|
|
|
19
|
-
exports.
|
|
34
|
+
exports.onceWarning = onceWarning;
|