Commit 2b53732a authored by zhengke's avatar zhengke

优化默认logo变形问题

parent ed357085
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
</template> </template>
</div> </div>
<div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded" <div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded"
style="padding: 30px 10px 30px 10px;"> style="padding:60px 10px;">
<el-empty description="暂无数据" :image="noDataImg(1)" /> <el-empty description="暂无数据" :image="noDataImg(1)" />
</div> </div>
<div v-if='queryObj.pageCount == queryObj.pageIndex && !loading' class="text-center q-pt-lg"><img :src="noDataImg(2)" width="118" /></div> <div v-if='queryObj.pageCount == queryObj.pageIndex && !loading' class="text-center q-pt-lg"><img :src="noDataImg(2)" width="118" /></div>
......
...@@ -145,17 +145,12 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false) = ...@@ -145,17 +145,12 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false) =
let y = templateObj[i] let y = templateObj[i]
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src) let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(tempSize.width/tempSize.height) let scale = parseInt(tempSize.width/tempSize.height)
let url = ''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%' // if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
if(scale==1) templateObj[i].src = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3] if(scale==1) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale<1) templateObj[i].src = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4] if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>1) templateObj[i].src = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5] if(scale>1) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(tempNewSlide){ let newTempSize = await FileService.getImageSizeWithoutDownloading(url)
tempNewSlide.elements.push(...templateObj)
}else{
elements.push(...templateObj)
tempNewSlide = copySlidHandlerLogo(slideIndex)
}
let newTempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let width = 0 let width = 0
let height = 0 let height = 0
//按照宽度进行缩放 //按照宽度进行缩放
...@@ -169,6 +164,14 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false) = ...@@ -169,6 +164,14 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false) =
} }
y.height = height y.height = height
y.width = width y.width = width
templateObj[i].src = url
if(tempNewSlide){
tempNewSlide.elements.push(...templateObj)
}else{
elements.push(...templateObj)
tempNewSlide = copySlidHandlerLogo(slideIndex)
}
} catch (error) { } catch (error) {
} }
......
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