🐞 fix:修复了轮播图效果
This commit is contained in:
parent
d369a78759
commit
0f468d26bf
Before Width: | Height: | Size: 237 KiB After Width: | Height: | Size: 237 KiB |
|
@ -9,9 +9,10 @@
|
||||||
>
|
>
|
||||||
<t-swiper-item v-for="(item, index) in imgArr" :key="index">
|
<t-swiper-item v-for="(item, index) in imgArr" :key="index">
|
||||||
<t-image
|
<t-image
|
||||||
v-lazy="{ src: item }"
|
:src="item"
|
||||||
|
item
|
||||||
fit="contain"
|
fit="contain"
|
||||||
:style="{ width: '120px', height: '120px' }"
|
:style="{ width: '400px', height: '120px' }"
|
||||||
@error="onError"
|
@error="onError"
|
||||||
/>
|
/>
|
||||||
</t-swiper-item>
|
</t-swiper-item>
|
||||||
|
@ -20,16 +21,16 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from 'vue'
|
||||||
import tubiao from "@/assets/img/tubiao.jpeg";
|
import tubiao from '@/assets/img/tubiao.jpeg'
|
||||||
import tubiao1 from "@/assets/img/tubiao1.jpeg";
|
import tubiao1 from '@/assets/img/tubiao1.jpeg'
|
||||||
import tubiao2 from "@/assets/img/tubiao2.jpeg";
|
import tubiao2 from '@/assets/img/tubiao2.jpeg'
|
||||||
|
|
||||||
const imgArr = [tubiao, tubiao1, tubiao2];
|
const imgArr = [tubiao, tubiao1, tubiao2]
|
||||||
|
|
||||||
const onError = () => {
|
const onError = () => {
|
||||||
console.log("onError");
|
console.log('onError')
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user