fix(ad) : 给广告添加圆角功能
This commit is contained in:
@@ -8,19 +8,20 @@ import { bannerInfo } from '@/views/AD/hooks/useAD';
|
|||||||
<h3>{{ bannerInfo?.title }}</h3>
|
<h3>{{ bannerInfo?.title }}</h3>
|
||||||
<el-space spacer="|">
|
<el-space spacer="|">
|
||||||
<!-- <el-text type="success">{{ bannerInfo.characters }}</el-text> -->
|
<!-- <el-text type="success">{{ bannerInfo.characters }}</el-text> -->
|
||||||
<el-text>{{ bannerInfo.publish_time.split('-').join('.') }} 发布</el-text>
|
<el-text>{{ bannerInfo?.publish_time.split('-').join('.') }} 发布</el-text>
|
||||||
</el-space>
|
</el-space>
|
||||||
</section>
|
</section>
|
||||||
|
<!-- banner内容 -->
|
||||||
<article>
|
<article>
|
||||||
<!-- 根据banner的类型使用不同的方式渲染 -->
|
<!-- 根据banner的类型使用不同的方式渲染 -->
|
||||||
<section v-if="bannerInfo?.type === 0">
|
<section class="banner-text" v-if="bannerInfo?.type === 0">
|
||||||
<p>{{ bannerInfo.synopsis }}</p>
|
<p>{{ bannerInfo.synopsis }}</p>
|
||||||
</section>
|
</section>
|
||||||
<section v-else-if="bannerInfo?.type === 1">
|
<div class="banner-image" v-else-if="bannerInfo?.type === 1">
|
||||||
<el-image :src="bannerInfo.file_address"></el-image>
|
<el-image fit="cover" loading="lazy" :src="bannerInfo.file_address" />
|
||||||
</section>
|
</div>
|
||||||
<section v-else-if="bannerInfo?.type === 2">
|
<section class="banner-video" v-else-if="bannerInfo?.type === 2">
|
||||||
<video width="320" height="240" controls>
|
<video width="100%" height="auto" controls>
|
||||||
<source :src="bannerInfo.file_address" type="video/mp4" />
|
<source :src="bannerInfo.file_address" type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
</section>
|
</section>
|
||||||
@@ -47,8 +48,11 @@ import { bannerInfo } from '@/views/AD/hooks/useAD';
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@use '@/assets/css/theme' as *;
|
||||||
|
|
||||||
.banner-container {
|
.banner-container {
|
||||||
padding: 20px;
|
padding: $gap * 2;
|
||||||
|
margin-bottom: $gap * 6;
|
||||||
|
|
||||||
.msg-info {
|
.msg-info {
|
||||||
font-family: PingFangSC-Medium;
|
font-family: PingFangSC-Medium;
|
||||||
@@ -58,5 +62,14 @@ import { bannerInfo } from '@/views/AD/hooks/useAD';
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.banner-text,
|
||||||
|
.banner-image,
|
||||||
|
.banner-video {
|
||||||
|
margin-top: $gap;
|
||||||
|
border-radius: $card-radius;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user