hrsass-components 1.7.50 → 1.7.51

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.
@@ -65,7 +65,7 @@ var contentStyle = _interopDefault(require('!!raw-loader!tinymce/skins/content/d
65
65
  var SvgPanZoom = _interopDefault(require('svg-pan-zoom'));
66
66
  var saveSvgAsPng = require('save-svg-as-png');
67
67
 
68
- var version = "1.7.50";
68
+ var version = "1.7.51";
69
69
 
70
70
  /**
71
71
  * 版本号
@@ -14024,6 +14024,10 @@ var index$h = {
14024
14024
  type: Number,
14025
14025
  "default": 10240
14026
14026
  },
14027
+ fileSizeZipLimit: {
14028
+ type: Number,
14029
+ "default": 10240
14030
+ },
14027
14031
  // 文件列表类型(可选: 文本text, 图片picture, 图片卡片picture-card)
14028
14032
  listType: {
14029
14033
  type: String,
@@ -14100,7 +14104,7 @@ var index$h = {
14100
14104
  },
14101
14105
  validateUrl: {
14102
14106
  type: String,
14103
- "default": ''
14107
+ "default": ""
14104
14108
  }
14105
14109
  },
14106
14110
  data: function data() {
@@ -14231,7 +14235,7 @@ var index$h = {
14231
14235
  this.fileList = [].concat(_toConsumableArray(this.fileList), [file]);
14232
14236
  return new Promise( /*#__PURE__*/function () {
14233
14237
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve, reject) {
14234
- var name, size, types, result, num;
14238
+ var name, size, types, result, _num, _num2;
14235
14239
  return _regeneratorRuntime.wrap(function _callee$(_context) {
14236
14240
  while (1) switch (_context.prev = _context.next) {
14237
14241
  case 0:
@@ -14253,18 +14257,26 @@ var index$h = {
14253
14257
  // );
14254
14258
  _this2.errorFileList.push(name);
14255
14259
  } else {
14256
- if (_this2.fileSizeLimit > 0) {
14257
- if (_this2.fileSizeLimit * 1024 < size) {
14260
+ if (_this2.fileSizeLimit > 0 || _this2.fileSizeZipLimit > 0) {
14261
+ if (_this2.fileSizeLimit * 1024 < size && !_this2.fileTypes.includes('.zip')) {
14258
14262
  result = false;
14259
- num = _this2.fileSizeLimit / 1024;
14260
- if (num > 0) {
14261
- num = "".concat(Number(num.toFixed(2)), "MB");
14263
+ _num = _this2.fileSizeLimit / 1024;
14264
+ if (_num > 0) {
14265
+ _num = "".concat(Number(_num.toFixed(2)), "MB");
14262
14266
  } else {
14263
- num = "".concat(_this2.fileSizeLimit, "KB");
14267
+ _num = "".concat(_this2.fileSizeLimit, "KB");
14268
+ }
14269
+ } else if (_this2.fileSizeZipLimit * 1024 < size && _this2.fileTypes.includes('.zip')) {
14270
+ result = false;
14271
+ _num2 = _this2.fileSizeZipLimit / 1024;
14272
+ if (_num2 > 0) {
14273
+ _num2 = "".concat(Number(_num2.toFixed(2)), "MB");
14274
+ } else {
14275
+ _num2 = "".concat(_this2.fileSizeZipLimit, "KB");
14264
14276
  }
14265
- _this2.$message.error("".concat(_this2.locale.fileSizeError, " (").concat(num, ")"));
14266
- _this2.errorFileList.push(name);
14267
14277
  }
14278
+ _this2.$message.error("".concat(_this2.locale.fileSizeError, " (").concat(num, ")"));
14279
+ _this2.errorFileList.push(name);
14268
14280
  }
14269
14281
  }
14270
14282
  if (!_this2.customBeforeUpload) {