Commit 226fcad4 authored by 张锡奇's avatar 张锡奇

upload

parent adf613ab
......@@ -68,6 +68,7 @@
flex-wrap: wrap;
>img{
width:20%;
height:20%;
margin-right:5%;
margin-bottom: 5%;
}
......@@ -146,7 +147,7 @@ export default {
var filePath = file.value; //js中无法获取文件的真是路径
var fileName = filePath.substring(filePath.lastIndexOf('\\')+1); //文件名
var extName = fileName.substring(fileName.lastIndexOf('.')+1); //后缀名
if(extName != 'png' && extName != 'jpg' && extName != 'jpeg'){
if(extName.toLocaleLowerCase() != 'png' && extName.toLocaleLowerCase() != 'jpg' && extName.toLocaleLowerCase() != 'jpeg'){
that.$vux.confirm.show({
title:"提示",
content:`不允许上传${extName}格式图片!`,
......@@ -200,9 +201,7 @@ export default {
content:data,
showCancelButton:false,
})
this.fileList.push({
src:base64
})
this.fileList = [{src:base64}]
}
}else if(xhr.status == 500){
let data = doc.getElementsByTagName('soap:Text')[0].firstChild.nodeValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment