36 lines
650 B
Vue
36 lines
650 B
Vue
<template lang="pug">
|
|
.Swiper
|
|
van-swipe.my-swipe(:autoplay='3000', indicator-color='white')
|
|
van-swipe-item(v-for="(v,i) in swiperList" :key="i")
|
|
div(v-if="v.id == null")
|
|
img(:src="v.img")
|
|
router-link(v-else :to="{ path: '/info', query: { id: v.id } }")
|
|
img(:src="v.img")
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'Swiper',
|
|
props: {
|
|
swiperList: {
|
|
type: Array,
|
|
default: []
|
|
}
|
|
},
|
|
data () {
|
|
return {}
|
|
},
|
|
async created () {
|
|
},
|
|
methods: {},
|
|
components: {}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
//@import "~@less/page/Home.less";
|
|
img {
|
|
width: 100%;
|
|
}
|
|
</style>
|