@lambo-design/upload-file 1.0.0-beta.22 → 1.0.0-beta.23

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 +1 -1
  2. package/src/index.vue +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/upload-file",
3
- "version": "1.0.0-beta.22",
3
+ "version": "1.0.0-beta.23",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
package/src/index.vue CHANGED
@@ -48,7 +48,7 @@ export default {
48
48
  accept: {//txt,word,excel
49
49
  type: String,
50
50
  required: false,
51
- default: "text/plain,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
51
+ default: ".pdf,text/plain,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
52
52
  },
53
53
  fileSuffix: {
54
54
  type: String,
@@ -174,7 +174,7 @@ export default {
174
174
  for (let file of e.target.files) {
175
175
  const reg = new RegExp("\.(" + this.fileSuffix + ")$", "i");
176
176
  if (!reg.test(file.name)) {
177
- alert('文件类型必须是doc,docx,txt,xls,xlsx,jpg,jpeg,png中的一种');
177
+ alert('文件类型必须是doc,docx,txt,pdf,xls,xlsx,jpg,jpeg,png中的一种');
178
178
  self.loading = false;
179
179
  return false;
180
180
  } else {