This commit is contained in:
2025-07-02 15:59:04 +08:00
parent 90f815b4f9
commit deb4cca695
2 changed files with 8 additions and 3 deletions

View File

@@ -38,7 +38,11 @@ defineExpose({
<template>
<template v-if="!$slots.default">
<!-- #ifndef MP-WEIXIN -->
<image @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<image v-if="!src.endsWith('.mp4')" @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<view class="relative" v-else @click="open">
<video v-bind="$attrs" :controls="false" :src="src"></video>
<view class="size-full absolute z-10 left-0 top-0"></view>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<image @click="open" :class="imageClass" :src="src" mode="aspectFill"></image>

View File

@@ -25,13 +25,14 @@ const openPrew = () => {
<template>
<view class="relative">
<x-image :sy="showSY" ref="XImageRef" class="!w-[160rpx] !h-[160rpx]" mode="aspectFill" :src="list[0]"
<x-image :sy="showSY" ref="XImageRef" class="!w-[160rpx] !h-[160rpx]"
mode="aspectFill" :src="list[0]"
:list="list"></x-image>
<image v-if="showSY" class="!size-full !absolute left-0 top-0" :src="ICON" mode="aspectFill"
@click="openPrew"></image>
<view class="!flex absolute left-1/2 -translate-x-1/2 bottom-[20rpx] z-10 gap-[8rpx]">
<view class="!flex absolute left-1/2 -translate-x-1/2 bottom-[20rpx] z-20 gap-[8rpx]">
<view v-for="(_v, index) in list"
:class="[`rounded-[50%] !size-[12rpx] ${index === 0 ? 'bg-[rgba(255,255,255,1)]' : 'bg-[rgba(255,255,255,.67)]'}`]"></view>
</view>