[update 拆分] 译文上传限制一个文件

This commit is contained in:
danshihao
2024-08-09 14:01:39 +08:00
parent fbc73a2b9d
commit 7e652bf215
2 changed files with 25 additions and 7 deletions
@@ -6,7 +6,7 @@
class="split-upload-list"
name="file"
:file-list="myFileList"
:multiple="true"
:multiple="multiple"
:action='uploadAction'
:headers="headers"
:list-type="listType"
@@ -28,12 +28,28 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'SplitAddClauseUploadImage',
props: [
'disabled',
'accept',
'title',
'listType'
],
props: {
disabled: {
type: Boolean,
default: false
},
accept: {
type: String,
default: ''
},
title: {
type: String,
default: ''
},
listType: {
type: String,
default: ''
},
multiple: {
type: Boolean,
default: true
}
},
data () {
return {
uploadVisible: false,
@@ -55,6 +71,7 @@ export default {
methods: {
open () {
this.uploadVisible = true
this.resetFileList()
},
perentHandleFunc (data) {
this.myFileList = data
@@ -242,6 +242,7 @@
:disabled="disabled"
:title="$t('uploadPictures')"
listType="picture"
:multiple="1"
accept=".png,.jpeg,.jpg,.gif"
@uploadSuccess="uploadSuccess">
</split-add-clause-upload-image>