xianniu-ui 0.5.6 → 0.5.7

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.6",
3
+ "version": "0.5.7",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -98,10 +98,9 @@
98
98
 
99
99
  <script>
100
100
  import ElImageViewer from "element-ui/packages/image/src/image-viewer";
101
- // import * as imageConversion from "image-conversion";
102
101
  import axios from "axios";
103
102
  import uploadPop from "./upload-pop.vue";
104
- const MAX_WARNING = 1024 * 20 * 1024
103
+ const MAX_WARNING = 1024 * 10 * 1024;
105
104
  export default {
106
105
  name: "XnUpload",
107
106
  inheritAttrs: false,
@@ -141,7 +140,7 @@ export default {
141
140
  },
142
141
  maxSize: {
143
142
  type: Number,
144
- default: 1024 * 50 * 1024, // 最大限制 50M
143
+ default: 1024 * 200 * 1024, // 最大限制 50M
145
144
  },
146
145
  compress: {
147
146
  type: Number,
@@ -235,8 +234,8 @@ export default {
235
234
  const formData = new FormData();
236
235
  const _file = file.file;
237
236
  formData.append("file", _file);
238
- this.$emit("on-uploading");
239
237
  this.isUploading = true;
238
+ this.$emit("on-uploaded", false);
240
239
  axios({
241
240
  method: "post",
242
241
  url: this.$XN.uploadUrl || "",
@@ -257,16 +256,16 @@ export default {
257
256
  file.onSuccess();
258
257
  this.$emit("update:fileList", this.successFiles);
259
258
  this.$emit("on-success", this.successFiles);
260
- this.$emit("on-uploaded");
259
+ this.$emit("on-uploaded", true);
261
260
  this.isUploading = false;
262
261
  if (this.file.size > MAX_WARNING) {
263
- this.$notify.closeAll()
262
+ this.$notify.closeAll();
264
263
  this.bigFileSucces();
265
264
  }
266
265
  })
267
266
  .catch((err) => {
268
267
  console.log(err);
269
- this.$notify.closeAll()
268
+ this.$notify.closeAll();
270
269
  this.$emit("update:fileList", this.successFiles);
271
270
  file.onError();
272
271
  });
@@ -334,7 +333,7 @@ export default {
334
333
  duration: 0,
335
334
  dangerouslyUseHTMLString: true,
336
335
  message: `
337
- <p class="text-primary">当前文件体积过大,请您耐心等待。</p>
336
+ <p class="text-primary">当前文件体积过大,请您耐心等待,在此期间请勿刷新页面。</p>
338
337
  <p>名称:${this.file.name}</p>
339
338
  <p>体积:${this.fileSize}</p>
340
339
  `,