2025-04-07 18:04:39 +08:00
|
|
|
<script setup>
|
2025-06-21 15:38:38 +08:00
|
|
|
import {ref} from "vue";
|
2025-04-07 18:04:39 +08:00
|
|
|
import testIcon from '../static/images/test.png';
|
2025-06-20 21:21:58 +08:00
|
|
|
import XImage from "./XImage.vue";
|
|
|
|
|
import ICON from "../static/icons/水印_素材案例.png";
|
2025-04-07 18:04:39 +08:00
|
|
|
|
2025-06-21 15:38:38 +08:00
|
|
|
const XImageRef = ref();
|
2025-06-20 21:21:58 +08:00
|
|
|
const {list, showSY} = defineProps({
|
2025-04-07 18:04:39 +08:00
|
|
|
list: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: [
|
|
|
|
|
testIcon, testIcon, testIcon, testIcon
|
|
|
|
|
],
|
|
|
|
|
},
|
2025-06-20 21:21:58 +08:00
|
|
|
showSY: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
}
|
2025-04-07 18:04:39 +08:00
|
|
|
});
|
2025-06-21 15:38:38 +08:00
|
|
|
|
|
|
|
|
const openPrew = () => {
|
|
|
|
|
XImageRef.value.open();
|
|
|
|
|
}
|
2025-04-07 18:04:39 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-06-20 21:21:58 +08:00
|
|
|
<view class="relative">
|
2025-06-21 15:38:38 +08:00
|
|
|
<x-image :sy="showSY" ref="XImageRef" class="!w-[160rpx] !h-[160rpx]" mode="aspectFill" :src="list[0]"
|
|
|
|
|
:list="list"></x-image>
|
2025-06-20 21:21:58 +08:00
|
|
|
|
2025-06-21 15:38:38 +08:00
|
|
|
<image v-if="showSY" class="!size-full !absolute left-0 top-0" :src="ICON" mode="aspectFill"
|
|
|
|
|
@click="openPrew"></image>
|
2025-06-20 21:21:58 +08:00
|
|
|
|
|
|
|
|
<view class="!flex absolute left-1/2 -translate-x-1/2 bottom-[20rpx] z-10 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>
|
|
|
|
|
</view>
|
2025-04-07 18:04:39 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|