ds-web-all 1.0.1-beta.96 → 1.0.1-beta.97
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.
|
@@ -160,7 +160,7 @@ var BaseUpload = function BaseUpload(_ref) {
|
|
|
160
160
|
var reg = new RegExp("(".concat(_accept.split(',').map(function (el) {
|
|
161
161
|
return el.replace(/^\./, '\\.');
|
|
162
162
|
}).join('|'), ")$"));
|
|
163
|
-
if (!reg.test(file.name || '')) {
|
|
163
|
+
if (_accept && !reg.test(file.name || '')) {
|
|
164
164
|
_message2.default.error("\u4EC5\u652F\u6301".concat(_accept.split(',').map(function (el) {
|
|
165
165
|
return el.replace(/^\./, '');
|
|
166
166
|
}).join('、'), "\u683C\u5F0F\u6587\u4EF6"));
|
|
@@ -181,10 +181,10 @@ var uploadFIle = function uploadFIle(_ref) {
|
|
|
181
181
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
182
182
|
while (1) switch (_context.prev = _context.next) {
|
|
183
183
|
case 0:
|
|
184
|
-
reg = new RegExp("(".concat(_accept.split(',').map(function (el) {
|
|
184
|
+
reg = new RegExp("(".concat((_accept || '').split(',').map(function (el) {
|
|
185
185
|
return el.replace(/^\./, '\\.');
|
|
186
186
|
}).join('|'), ")$"));
|
|
187
|
-
if (reg.test(file.name || '')) {
|
|
187
|
+
if (!(_accept && !reg.test(file.name || ''))) {
|
|
188
188
|
_context.next = 5;
|
|
189
189
|
break;
|
|
190
190
|
}
|