Files
dvcp_v2_wxcp_app/components/AiNoticeBar.vue

37 lines
701 B
Vue
Raw Normal View History

2022-02-10 18:01:55 +08:00
<template>
2022-02-16 17:36:14 +08:00
<swiper class="AiNoticeBar" :autoplay="autoplay" vertical circular :interval="2000">
2022-02-10 18:01:55 +08:00
<swiper-item v-for="(item, index) in ops" :key="index" :display-multiple-items="rows" class="noticeItem">
<slot :label="item"/>
</swiper-item>
</swiper>
</template>
<script>
export default {
name: 'AiNoticeBar',
props: {
list: {default: () => []},
rows: {default: 1},
2022-02-16 17:36:14 +08:00
nodeKey: {default: ""},
autoplay: {default: true}
2022-02-10 18:01:55 +08:00
},
computed: {
ops() {
let {nodeKey} = this
return this.list.map(e => e[nodeKey])
}
}
}
</script>
<style lang="scss" scoped>
.AiNoticeBar {
height: 100%;
.noticeItem {
height: initial !important;
}
}
</style>