[update 拆分] 译文上传限制一个文件
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
class="split-upload-list"
|
class="split-upload-list"
|
||||||
name="file"
|
name="file"
|
||||||
:file-list="myFileList"
|
:file-list="myFileList"
|
||||||
:multiple="true"
|
:multiple="multiple"
|
||||||
:action='uploadAction'
|
:action='uploadAction'
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:list-type="listType"
|
:list-type="listType"
|
||||||
@@ -28,12 +28,28 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SplitAddClauseUploadImage',
|
name: 'SplitAddClauseUploadImage',
|
||||||
props: [
|
props: {
|
||||||
'disabled',
|
disabled: {
|
||||||
'accept',
|
type: Boolean,
|
||||||
'title',
|
default: false
|
||||||
'listType'
|
},
|
||||||
],
|
accept: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
listType: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
multiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
uploadVisible: false,
|
uploadVisible: false,
|
||||||
@@ -55,6 +71,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open () {
|
open () {
|
||||||
this.uploadVisible = true
|
this.uploadVisible = true
|
||||||
|
this.resetFileList()
|
||||||
},
|
},
|
||||||
perentHandleFunc (data) {
|
perentHandleFunc (data) {
|
||||||
this.myFileList = data
|
this.myFileList = data
|
||||||
|
|||||||
@@ -242,6 +242,7 @@
|
|||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:title="$t('uploadPictures')"
|
:title="$t('uploadPictures')"
|
||||||
listType="picture"
|
listType="picture"
|
||||||
|
:multiple="1"
|
||||||
accept=".png,.jpeg,.jpg,.gif"
|
accept=".png,.jpeg,.jpg,.gif"
|
||||||
@uploadSuccess="uploadSuccess">
|
@uploadSuccess="uploadSuccess">
|
||||||
</split-add-clause-upload-image>
|
</split-add-clause-upload-image>
|
||||||
|
|||||||
Reference in New Issue
Block a user