@lambo-design/upload-file 1.0.0-beta.29 → 1.0.0-beta.30

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.vue +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/upload-file",
3
- "version": "1.0.0-beta.29",
3
+ "version": "1.0.0-beta.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -12,8 +12,8 @@
12
12
  "devDependencies": {
13
13
  "axios": "^0.24.0",
14
14
  "axios-cache-plugin": "^0.1.0",
15
- "@lambo-design/shared": "^1.0.0-beta.250",
16
- "@lambo-design/core": "^4.7.1-beta.158"
15
+ "@lambo-design/core": "^4.7.1-beta.162",
16
+ "@lambo-design/shared": "^1.0.0-beta.267"
17
17
  },
18
18
  "scripts": {
19
19
  "release-upload-file": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
package/src/index.vue CHANGED
@@ -51,12 +51,12 @@ export default {
51
51
  accept: {//txt,word,excel
52
52
  type: String,
53
53
  required: false,
54
- default: "application/pdf,text/plain,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,image/png,image/jpeg,image/gif,application/zip,.rar"
54
+ default: "application/pdf,text/plain,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/zip,.rar"
55
55
  },
56
56
  fileSuffix: {
57
57
  type: String,
58
58
  required: false,
59
- default: "pdf|doc|docx|txt|xls|xlsx|jpg|jpeg|png|gif|zip|rar"
59
+ default: "pdf|doc|docx|txt|xls|xlsx|zip|rar"
60
60
  },
61
61
  //描述信息
62
62
  descInfo: {
@@ -200,7 +200,7 @@ export default {
200
200
  const reg = new RegExp("\.(" + this.fileSuffix + ")$", "i");
201
201
  if (!reg.test(file.name)) {
202
202
  alert(self.dynamicFileTypeAlertMessage);
203
- self.loading = false;
203
+ this.$refs.uploadInput.value = null; // 清空文件输入框 self.loading = false;
204
204
  return false;
205
205
  } else {
206
206
  if (this.fileMaxSize && file.size > this.fileMaxSize * 1024 * 1024) {