12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <div style="" >
- <el-carousel class="" ref="carousel" arrow="always" v-if="pptView"
- height="900px" trigger="click" :autoplay="false" indicator-position="outside">
- <el-carousel-item class="lun_img" v-for="(item,index) in imgs" v-bind:key="item" >
- <img :src="item" width="100%" height="100%" object-fit="cover" />
- </el-carousel-item>
- </el-carousel>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- imgs:[],
- pptView:false,
- }
- },
- mounted() {
- this.ppt()
- },
- methods: {
- ppt(){
- this.pptView=true;
- console.log(this.$route.query.imgs)
- //判断ppt是否可能出现只有一页而页面加载报错的情况 一页就返回string 多页就是返回集合
- if(typeof this.$route.query.imgs =='string'){
- this.imgs.push( this.$route.query.imgs);
- }else {
- this.imgs=this.$route.query.imgs
- }
- console.log(this.imgs)
- }
- }
- }
- </script>
|