123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <div id="banner">
- <el-row v-if="bannerInfo.info.display">
- <el-col :span="24" class="main">
- <el-col :span="24" class="one">
- <el-carousel
- :height="bannerInfo.info.height"
- :trigger="bannerInfo.info.trigger"
- :autoplay="bannerInfo.info.autoplay"
- :interval="bannerInfo.info.interval"
- :indicator-position="bannerInfo.info.indicatorpos"
- :arrow="bannerInfo.info.arrow"
- :type="bannerInfo.info.type"
- :loop="bannerInfo.info.loop"
- :direction="bannerInfo.info.direction"
- >
- <el-carousel-item v-for="(item, index) in bannerInfo.list" :key="index">
- <el-image :src="item.url"></el-image>
- </el-carousel-item>
- </el-carousel>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'banner',
- props: {
- bannerInfo: { type: Object, default: () => {} },
- },
- components: {},
- data: function() {
- return {};
- },
- created() {},
- methods: {},
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- .one {
- .el-image {
- width: 100%;
- height: 400px;
- overflow: hidden;
- }
- }
- }
- </style>
|