@lambo-design/upload-file 1.0.0-beta.22 → 1.0.0-beta.24
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 +3 -3
- package/src/index.vue +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/upload-file",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.24",
|
|
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/
|
|
16
|
-
"@lambo-design/
|
|
15
|
+
"@lambo-design/shared": "^1.0.0-beta.220",
|
|
16
|
+
"@lambo-design/core": "^4.7.1-beta.145"
|
|
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
|
@@ -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 {
|
|
@@ -326,6 +326,9 @@ export default {
|
|
|
326
326
|
},
|
|
327
327
|
deep: true
|
|
328
328
|
}
|
|
329
|
+
},
|
|
330
|
+
mounted() {
|
|
331
|
+
this.initFileList(this.fileIdList)
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
334
|
</script>
|