Commit 37597cb6 authored by shilei's avatar shilei

Merge branch 'dev' of http://101.201.78.203/cfld-front/liyeyun into dev

parents fe049fc9 5996e15e
<!-- 图片展示,方便修改占位图、错误图 --> <!-- 图片展示,方便修改占位图、错误图 -->
<template> <template>
<ElImage :src="src" @click="handleClick"> <ElImage :src="formatedSrc" @click="handleClick">
<template #placeholder> <template #placeholder>
<img class="h-full w-full" :src="currentdefault" @click.stop="handleClick" /> <img class="h-full w-full" :src="currentdefault" @click="handleClick" />
</template> </template>
<template #error> <template #error>
<img class="h-full w-full" :src="currentdefault" @click.stop="handleClick" /> <img class="h-full w-full" :src="currentdefault" @click="handleClick" />
</template> </template>
</ElImage> </ElImage>
</template> </template>
...@@ -45,6 +45,15 @@ const currentdefault = computed(() => { ...@@ -45,6 +45,15 @@ const currentdefault = computed(() => {
return props.type ? config[props.type] : defaultPicIcon; return props.type ? config[props.type] : defaultPicIcon;
}); });
const formatedSrc = computed(() => {
const { src } = props;
if (src) {
return `${src}?x-image-process=style/style-a460`;
} else {
return src;
}
});
const handleClick = () => { const handleClick = () => {
emit('click'); emit('click');
}; };
......
...@@ -97,10 +97,12 @@ ...@@ -97,10 +97,12 @@
</div> </div>
<div v-if="homePageData?.noticeList.length" class="flex items-center"> <div v-if="homePageData?.noticeList.length" class="flex items-center">
<img src="@/assets/images/icon-volume.png" class="h-4 w-4" alt="" /> <img src="@/assets/images/icon-volume.png" class="h-4 w-4" alt="" />
<div class="relative h-5 w-[180px] overflow-hidden"> <div style="width: calc(850px - 17px)" class="relative h-5 overflow-hidden text-sm">
<ul ref="marquee2" class="ml-2 h-5 w-[200px] overflow-y-scroll text-sm text-white"> <ul ref="marquee2" class="ml-2 h-5 w-[850px] overflow-y-scroll text-sm text-white">
<li v-for="item in homePageData.noticeList" :key="item.name" class="name"> <li v-for="item in homePageData.noticeList" :key="item.name" class="name">
<p class="w-180 ell">{{ item.name }}</p> <p class="w-180 ell">
{{ item.name }}
</p>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -169,7 +171,7 @@ ...@@ -169,7 +171,7 @@
:src="item.imgUrl" :src="item.imgUrl"
alt="" alt=""
/> />
<div v-if="!item.isVr" class="absolute bottom-2 left-2"> <div v-if="item.isVr" class="absolute bottom-2 left-2">
<img class="h-[45px] w-[45px] rounded-[50%]" src="@/assets/images/vr-icon.png" /> <img class="h-[45px] w-[45px] rounded-[50%]" src="@/assets/images/vr-icon.png" />
</div> </div>
</div> </div>
......
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