拆分图片上传问题
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
|
||||
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title" @cancel="handlePreImgCancel">
|
||||
<a-upload-dragger
|
||||
:accept='accept'
|
||||
:disabled="disabled"
|
||||
@@ -53,7 +53,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.splitVisible
|
||||
console.log('accept11111',this.accept)
|
||||
// console.log('accept11111',this.accept)
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods: {
|
||||
@@ -74,7 +74,7 @@
|
||||
this.fileTypeSatus=false
|
||||
let fileTypes=this.accept.split('/')
|
||||
let fileNowTypes=file.type.split('/')
|
||||
fileFlag=fileTypes[0]==fileTypes[0]?true:false
|
||||
fileFlag=(fileTypes[0]==fileNowTypes[0])?true:false
|
||||
// console.log('filetype',fileFlag)
|
||||
if(!fileFlag){
|
||||
this.$message.warning(this.$t('fileFormatIncorrect'))
|
||||
@@ -175,6 +175,9 @@
|
||||
preview(file) {
|
||||
// console.log('file111',file)
|
||||
this.previewImage = file.response.path;
|
||||
},
|
||||
handlePreImgCancel(){
|
||||
this.$emit('coloseHandle',false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user