xianniu-ui 0.5.5 → 0.5.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -101,6 +101,7 @@ import ElImageViewer from "element-ui/packages/image/src/image-viewer";
101
101
  // import * as imageConversion from "image-conversion";
102
102
  import axios from "axios";
103
103
  import uploadPop from "./upload-pop.vue";
104
+ const MAX_WARNING = 1024 * 20 * 1024
104
105
  export default {
105
106
  name: "XnUpload",
106
107
  inheritAttrs: false,
@@ -213,7 +214,7 @@ export default {
213
214
  return false;
214
215
  }
215
216
  this.file = file;
216
- if (file.size > 1024 * 1 * 1024) {
217
+ if (file.size > MAX_WARNING) {
217
218
  this.bigFileWarning();
218
219
  }
219
220
  return this.onExceedSize(file.size);
@@ -258,7 +259,7 @@ export default {
258
259
  this.$emit("on-success", this.successFiles);
259
260
  this.$emit("on-uploaded");
260
261
  this.isUploading = false;
261
- if (this.file.size > 1024 * 1 * 1024) {
262
+ if (this.file.size > MAX_WARNING) {
262
263
  this.$notify.closeAll()
263
264
  this.bigFileSucces();
264
265
  }