This commit is contained in:
yanran200730
2022-07-28 11:10:10 +08:00
parent a1b4574bae
commit 4abe2b7bf5

View File

@@ -81,6 +81,7 @@
:limit="9"
action="/app/wxcp/upload/uploadFile"
accept=".jpg,.png,.jpeg"
:on-exceed="onExceed"
:http-request="v => submitUpload(v, '1')">
<div class="content-item" trigger>
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-img.png" />
@@ -96,6 +97,7 @@
:limit="9"
action="/app/wxcp/upload/uploadFile"
accept=".mp4"
:on-exceed="onExceed"
:http-request="v => submitUpload(v, '2')">
<div class="content-item" trigger>
<img src="https://cdn.cunwuyun.cn/dvcp/announce/big-video.png" />
@@ -109,6 +111,7 @@
:show-file-list="false"
:before-upload="v => handleChange(v, 20, '.zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt')"
:limit="9"
:on-exceed="onExceed"
action="/app/wxcp/upload/uploadFile"
accept=".zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt"
:http-request="v => submitUpload(v, '3')">
@@ -523,6 +526,10 @@
return true
},
onExceed () {
this.$message.error(`最多上传9个附件`)
},
submitUpload (file, type) {
const fileType = {
'1': 'image',