🐞 fix:修复了轮播图效果

This commit is contained in:
sundongyu 2024-04-01 13:26:56 +08:00
parent d369a78759
commit 0f468d26bf
2 changed files with 10 additions and 9 deletions

View File

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 237 KiB

View File

@ -9,9 +9,10 @@
>
<t-swiper-item v-for="(item, index) in imgArr" :key="index">
<t-image
v-lazy="{ src: item }"
:src="item"
item
fit="contain"
:style="{ width: '120px', height: '120px' }"
:style="{ width: '400px', height: '120px' }"
@error="onError"
/>
</t-swiper-item>
@ -20,16 +21,16 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import tubiao from "@/assets/img/tubiao.jpeg";
import tubiao1 from "@/assets/img/tubiao1.jpeg";
import tubiao2 from "@/assets/img/tubiao2.jpeg";
import { ref } from 'vue'
import tubiao from '@/assets/img/tubiao.jpeg'
import tubiao1 from '@/assets/img/tubiao1.jpeg'
import tubiao2 from '@/assets/img/tubiao2.jpeg'
const imgArr = [tubiao, tubiao1, tubiao2];
const imgArr = [tubiao, tubiao1, tubiao2]
const onError = () => {
console.log("onError");
};
console.log('onError')
}
</script>
<style scoped lang="less">