eoss-ui 0.4.27 → 0.4.28

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/lib/upload.js CHANGED
@@ -2682,8 +2682,8 @@ module.exports = require("qs");
2682
2682
  // ESM COMPAT FLAG
2683
2683
  __webpack_require__.r(__webpack_exports__);
2684
2684
 
2685
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=386254b4&
2686
- var mainvue_type_template_id_386254b4_render = function () {
2685
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=0f78a687&
2686
+ var mainvue_type_template_id_0f78a687_render = function () {
2687
2687
  var _vm = this
2688
2688
  var _h = _vm.$createElement
2689
2689
  var _c = _vm._self._c || _h
@@ -3017,10 +3017,10 @@ var mainvue_type_template_id_386254b4_render = function () {
3017
3017
  )
3018
3018
  }
3019
3019
  var staticRenderFns = []
3020
- mainvue_type_template_id_386254b4_render._withStripped = true
3020
+ mainvue_type_template_id_0f78a687_render._withStripped = true
3021
3021
 
3022
3022
 
3023
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=386254b4&
3023
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=0f78a687&
3024
3024
 
3025
3025
  // EXTERNAL MODULE: ./src/config/api.js
3026
3026
  var api = __webpack_require__(1);
@@ -3799,9 +3799,7 @@ var _props;
3799
3799
  text = '附件总';
3800
3800
  }
3801
3801
  }
3802
- if (flag) {
3803
- this.filesTotalSize += se;
3804
- } else {
3802
+ if (!flag) {
3805
3803
  this.$message.error('\u4E0A\u4F20' + text + '\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7' + size + 'KB!');
3806
3804
  }
3807
3805
  return flag;
@@ -3848,6 +3846,8 @@ var _props;
3848
3846
  }
3849
3847
  }).then(function (res) {
3850
3848
  if (res.rCode === 0) {
3849
+ var se = _this6.filesTotalSize - Math.ceil(file.size / 1024 * 100) / 100;
3850
+ _this6.filesTotalSize = se;
3851
3851
  _this6.$message.success(res.msg);
3852
3852
  resolve();
3853
3853
  } else {
@@ -3952,6 +3952,8 @@ var _props;
3952
3952
  this.$message.success(response.msg);
3953
3953
  }
3954
3954
  }
3955
+ var se = this.filesTotalSize + Math.ceil(file.size / 1024 * 100) / 100;
3956
+ this.filesTotalSize = se;
3955
3957
  this.onSuccess && this.onSuccess(response, file, fileList);
3956
3958
  this.$emit('success', response, file, fileList);
3957
3959
  if (this.resultFile) {
@@ -4009,7 +4011,7 @@ var componentNormalizer = __webpack_require__(2);
4009
4011
 
4010
4012
  var component = Object(componentNormalizer["a" /* default */])(
4011
4013
  src_mainvue_type_script_lang_js_,
4012
- mainvue_type_template_id_386254b4_render,
4014
+ mainvue_type_template_id_0f78a687_render,
4013
4015
  staticRenderFns,
4014
4016
  false,
4015
4017
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.27",
3
+ "version": "0.4.28",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -859,9 +859,7 @@ export default {
859
859
  text = '附件总';
860
860
  }
861
861
  }
862
- if (flag) {
863
- this.filesTotalSize += se;
864
- } else {
862
+ if (!flag) {
865
863
  this.$message.error(`上传${text}大小不能超过${size}KB!`);
866
864
  }
867
865
  return flag;
@@ -917,6 +915,10 @@ export default {
917
915
  })
918
916
  .then((res) => {
919
917
  if (res.rCode === 0) {
918
+ let se =
919
+ this.filesTotalSize -
920
+ Math.ceil((file.size / 1024) * 100) / 100;
921
+ this.filesTotalSize = se;
920
922
  this.$message.success(res.msg);
921
923
  resolve();
922
924
  } else {
@@ -1045,6 +1047,8 @@ export default {
1045
1047
  this.$message.success(response.msg);
1046
1048
  }
1047
1049
  }
1050
+ let se = this.filesTotalSize + Math.ceil((file.size / 1024) * 100) / 100;
1051
+ this.filesTotalSize = se;
1048
1052
  this.onSuccess && this.onSuccess(response, file, fileList);
1049
1053
  this.$emit('success', response, file, fileList);
1050
1054
  if (this.resultFile) {
package/src/index.js CHANGED
@@ -115,7 +115,7 @@ if (typeof window !== 'undefined' && window.Vue) {
115
115
  }
116
116
 
117
117
  export default {
118
- version: '0.4.27',
118
+ version: '0.4.28',
119
119
  install,
120
120
  Button,
121
121
  ButtonGroup,