assui 3.0.42 → 3.0.43
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.
|
@@ -179,6 +179,7 @@ import Spin from "antd/es/spin";
|
|
|
179
179
|
import classNames from 'classnames';
|
|
180
180
|
import CloseOutlined from "a-icons/es/CloseOutlined";
|
|
181
181
|
import isObject from 'lodash/isObject';
|
|
182
|
+
import isFunction from 'lodash/isFunction';
|
|
182
183
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
183
184
|
var URL = window.URL || window.webkitURL;
|
|
184
185
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -218,11 +219,16 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
218
219
|
setImageLoading(true);
|
|
219
220
|
setUploadStatus('done');
|
|
220
221
|
// eslint-disable-next-line global-require
|
|
221
|
-
var heic2Jpeg = require('aa-utils/lib/heic2Jpeg');
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
var heic2Jpeg = require('aa-utils/lib/heic2Jpeg')["default"];
|
|
223
|
+
if (isFunction(heic2Jpeg)) {
|
|
224
|
+
heic2Jpeg(value).then(function (resultUrl) {
|
|
225
|
+
setFileUrl(resultUrl);
|
|
226
|
+
setImageLoading(false);
|
|
227
|
+
});
|
|
228
|
+
} else {
|
|
229
|
+
setFileUrl(value);
|
|
224
230
|
setImageLoading(false);
|
|
225
|
-
}
|
|
231
|
+
}
|
|
226
232
|
} else {
|
|
227
233
|
setUploadStatus('init');
|
|
228
234
|
}
|
|
@@ -222,6 +222,7 @@ var spin_1 = __importDefault(require("antd/lib/spin"));
|
|
|
222
222
|
var classnames_1 = __importDefault(require("classnames"));
|
|
223
223
|
var CloseOutlined_1 = __importDefault(require("a-icons/lib/CloseOutlined"));
|
|
224
224
|
var isObject_1 = __importDefault(require("lodash/isObject"));
|
|
225
|
+
var isFunction_1 = __importDefault(require("lodash/isFunction"));
|
|
225
226
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
226
227
|
var URL = window.URL || window.webkitURL;
|
|
227
228
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -261,11 +262,16 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
261
262
|
setImageLoading(true);
|
|
262
263
|
setUploadStatus('done');
|
|
263
264
|
// eslint-disable-next-line global-require
|
|
264
|
-
var heic2Jpeg = require('aa-utils/lib/heic2Jpeg');
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
var heic2Jpeg = require('aa-utils/lib/heic2Jpeg')["default"];
|
|
266
|
+
if ((0, isFunction_1["default"])(heic2Jpeg)) {
|
|
267
|
+
heic2Jpeg(value).then(function (resultUrl) {
|
|
268
|
+
setFileUrl(resultUrl);
|
|
269
|
+
setImageLoading(false);
|
|
270
|
+
});
|
|
271
|
+
} else {
|
|
272
|
+
setFileUrl(value);
|
|
267
273
|
setImageLoading(false);
|
|
268
|
-
}
|
|
274
|
+
}
|
|
269
275
|
} else {
|
|
270
276
|
setUploadStatus('init');
|
|
271
277
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.43",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
82
|
"license": "MIT",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "e7c8e0881a9e3c368075ea9a6298184f7b7c8f5c"
|
|
84
84
|
}
|