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/lib/xianniu-ui.common.js +27 -26
- package/lib/xianniu-ui.umd.js +27 -26
- package/lib/xianniu-ui.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/upload/main.vue +3 -2
package/package.json
CHANGED
package/packages/upload/main.vue
CHANGED
|
@@ -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 >
|
|
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 >
|
|
262
|
+
if (this.file.size > MAX_WARNING) {
|
|
262
263
|
this.$notify.closeAll()
|
|
263
264
|
this.bigFileSucces();
|
|
264
265
|
}
|