assui 3.0.41 → 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.
|
@@ -178,8 +178,8 @@ import Image from "antd/es/image";
|
|
|
178
178
|
import Spin from "antd/es/spin";
|
|
179
179
|
import classNames from 'classnames';
|
|
180
180
|
import CloseOutlined from "a-icons/es/CloseOutlined";
|
|
181
|
-
import heic2Jpeg from "aa-utils/es/heic2Jpeg";
|
|
182
181
|
import isObject from 'lodash/isObject';
|
|
182
|
+
import isFunction from 'lodash/isFunction';
|
|
183
183
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
184
184
|
var URL = window.URL || window.webkitURL;
|
|
185
185
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -218,10 +218,17 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
218
218
|
if (value) {
|
|
219
219
|
setImageLoading(true);
|
|
220
220
|
setUploadStatus('done');
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
// eslint-disable-next-line global-require
|
|
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);
|
|
223
230
|
setImageLoading(false);
|
|
224
|
-
}
|
|
231
|
+
}
|
|
225
232
|
} else {
|
|
226
233
|
setUploadStatus('init');
|
|
227
234
|
}
|
|
@@ -221,8 +221,8 @@ var image_1 = __importDefault(require("antd/lib/image"));
|
|
|
221
221
|
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
|
-
var heic2Jpeg_1 = __importDefault(require("aa-utils/lib/heic2Jpeg"));
|
|
225
224
|
var isObject_1 = __importDefault(require("lodash/isObject"));
|
|
225
|
+
var isFunction_1 = __importDefault(require("lodash/isFunction"));
|
|
226
226
|
var getLocalImgURL = function getLocalImgURL(file) {
|
|
227
227
|
var URL = window.URL || window.webkitURL;
|
|
228
228
|
var imgURL = URL.createObjectURL(file);
|
|
@@ -261,10 +261,17 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
261
261
|
if (value) {
|
|
262
262
|
setImageLoading(true);
|
|
263
263
|
setUploadStatus('done');
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
// eslint-disable-next-line global-require
|
|
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);
|
|
266
273
|
setImageLoading(false);
|
|
267
|
-
}
|
|
274
|
+
}
|
|
268
275
|
} else {
|
|
269
276
|
setUploadStatus('init');
|
|
270
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
|
}
|