fix: 修复图片bug
This commit is contained in:
parent
9055f9e62e
commit
8326d4c6f3
|
|
@ -171,11 +171,21 @@
|
||||||
backface-visibility: hidden;
|
backface-visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 确保video的poster填满整个容器 */
|
/* 自定义视频封面 */
|
||||||
.single-video[poster] {
|
.video-poster {
|
||||||
background-size: cover !important;
|
position: absolute;
|
||||||
background-position: center !important;
|
top: 0;
|
||||||
background-repeat: no-repeat !important;
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.single-video {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 视频样式 */
|
/* 视频样式 */
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,14 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
||||||
{isOutputVideo ? (
|
{isOutputVideo ? (
|
||||||
// 当output是视频时,只显示单个视频
|
// 当output是视频时,只显示单个视频
|
||||||
<View className='single-video-container'>
|
<View className='single-video-container'>
|
||||||
|
<Image
|
||||||
|
className='video-poster'
|
||||||
|
src={template.inputExample}
|
||||||
|
mode='aspectFill'
|
||||||
|
/>
|
||||||
<Video
|
<Video
|
||||||
className='single-video'
|
className='single-video'
|
||||||
src={template.outputExample}
|
src={template.outputExample}
|
||||||
poster={template.inputExample} // 使用input作为视频缩略图
|
|
||||||
autoplay
|
autoplay
|
||||||
muted
|
muted
|
||||||
loop
|
loop
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue