Commit 417ae17d authored by 罗超's avatar 罗超

修复图片无法加载的问题

parent 74cc0914
......@@ -193,14 +193,14 @@ const setImgs = async () => {
type: 'warning',
})
}
if(activeName.value=='4'){
if(activeName.value=='1'||activeName.value=='3' || activeName.value == '4'){
const downLoading = ElLoading.service({
lock:true,
text:'正在导入图片'
})
try {
downloadInfo = await FileService.convertNetworkToBase64Async(url)
url = downloadInfo.url
//url = downloadInfo.url
propsDatas.value.src = url
} catch (error) {}
if(downloadInfo.url == ''){
......@@ -221,7 +221,7 @@ const setImgs = async () => {
if(imgType.value==2){
if(activeName.value=='1'||activeName.value=='3' || activeName.value == '4'){
let tempSize = downloadInfo
if(activeName.value != '4') tempSize = await FileService.getImageSizeWithoutDownloading(propsDatas.value.src)
//if(activeName.value != '4') tempSize = await FileService.getImageSizeWithoutDownloading(propsDatas.value.src)
setPropsDatas(tempSize)
} else{
const image = new Image()
......
......@@ -265,7 +265,7 @@ const GetTripFiledData = async () =>{
try {
// let width = y.width
// let height = y.height
let tempSize = await FileService.getImageSizeWithoutDownloading(value[0])
let tempSize = await FileService.convertNetworkToBase64Async(value[0])//await FileService.getImageSizeWithoutDownloading(value[0])
let width = 0
let height = 0
//按照宽度进行缩放
......
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