BUG 27161
This commit is contained in:
35
src/components/AiNoticeBar.vue
Normal file
35
src/components/AiNoticeBar.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<swiper class="AiNoticeBar" autoplay vertical circular :interval="2000">
|
||||
<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},
|
||||
nodeKey: {default: ""}
|
||||
},
|
||||
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>
|
||||
Reference in New Issue
Block a user