wargerm 0.5.10 → 0.5.11
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/dist/index.esm.js +5 -3
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -584,7 +584,7 @@ var Index = WInput;
|
|
584
584
|
Index.TextArea = _Input.TextArea;
|
585
585
|
WInput.defaultProps = {};
|
586
586
|
|
587
|
-
var _excluded$1 = ["value", "onChange", "beforeUpload", "uploadButton", "maxCount", "fetchMethod", "getFileList"];
|
587
|
+
var _excluded$1 = ["value", "onChange", "beforeUpload", "uploadButton", "maxCount", "splitStr", "fetchMethod", "getFileList"];
|
588
588
|
|
589
589
|
function Index$1(_ref, ref) {
|
590
590
|
var value = _ref.value,
|
@@ -592,6 +592,8 @@ function Index$1(_ref, ref) {
|
|
592
592
|
beforeUpload = _ref.beforeUpload,
|
593
593
|
uploadButton = _ref.uploadButton,
|
594
594
|
maxCount = _ref.maxCount,
|
595
|
+
_ref$splitStr = _ref.splitStr,
|
596
|
+
splitStr = _ref$splitStr === void 0 ? ',' : _ref$splitStr,
|
595
597
|
fetchMethod = _ref.fetchMethod,
|
596
598
|
getFileList = _ref.getFileList,
|
597
599
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
@@ -602,7 +604,7 @@ function Index$1(_ref, ref) {
|
|
602
604
|
setFileList = _useState2[1];
|
603
605
|
|
604
606
|
useEffect(function () {
|
605
|
-
setFileList(value ? value.split(
|
607
|
+
setFileList(value ? value.split(splitStr).map(function (url) {
|
606
608
|
return {
|
607
609
|
uid: Math.random().toString(36).slice(2, 36),
|
608
610
|
name: '',
|
@@ -694,7 +696,7 @@ function Index$1(_ref, ref) {
|
|
694
696
|
case 6:
|
695
697
|
urls = newFileList.map(function (file) {
|
696
698
|
return file.url;
|
697
|
-
}).join(
|
699
|
+
}).join(splitStr);
|
698
700
|
onChange && onChange(urls);
|
699
701
|
setFileList(newFileList);
|
700
702
|
|
package/dist/index.js
CHANGED
@@ -644,7 +644,7 @@ var Index = WInput;
|
|
644
644
|
Index.TextArea = _Input__default['default'].TextArea;
|
645
645
|
WInput.defaultProps = {};
|
646
646
|
|
647
|
-
var _excluded$1 = ["value", "onChange", "beforeUpload", "uploadButton", "maxCount", "fetchMethod", "getFileList"];
|
647
|
+
var _excluded$1 = ["value", "onChange", "beforeUpload", "uploadButton", "maxCount", "splitStr", "fetchMethod", "getFileList"];
|
648
648
|
|
649
649
|
function Index$1(_ref, ref) {
|
650
650
|
var value = _ref.value,
|
@@ -652,6 +652,8 @@ function Index$1(_ref, ref) {
|
|
652
652
|
beforeUpload = _ref.beforeUpload,
|
653
653
|
uploadButton = _ref.uploadButton,
|
654
654
|
maxCount = _ref.maxCount,
|
655
|
+
_ref$splitStr = _ref.splitStr,
|
656
|
+
splitStr = _ref$splitStr === void 0 ? ',' : _ref$splitStr,
|
655
657
|
fetchMethod = _ref.fetchMethod,
|
656
658
|
getFileList = _ref.getFileList,
|
657
659
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
@@ -662,7 +664,7 @@ function Index$1(_ref, ref) {
|
|
662
664
|
setFileList = _useState2[1];
|
663
665
|
|
664
666
|
React.useEffect(function () {
|
665
|
-
setFileList(value ? value.split(
|
667
|
+
setFileList(value ? value.split(splitStr).map(function (url) {
|
666
668
|
return {
|
667
669
|
uid: Math.random().toString(36).slice(2, 36),
|
668
670
|
name: '',
|
@@ -754,7 +756,7 @@ function Index$1(_ref, ref) {
|
|
754
756
|
case 6:
|
755
757
|
urls = newFileList.map(function (file) {
|
756
758
|
return file.url;
|
757
|
-
}).join(
|
759
|
+
}).join(splitStr);
|
758
760
|
onChange && onChange(urls);
|
759
761
|
setFileList(newFileList);
|
760
762
|
|