[update 拆分] 译文上传限制一个文件
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user