|
@@ -19,6 +19,18 @@
|
|
|
<!-- 不显示指示器 -->
|
|
|
<!-- :indicator-position='rotationImg.length == 1 ? "none":""' -->
|
|
|
<el-carousel
|
|
|
+ v-else-if='type!="5"'
|
|
|
+ style='height:100%;width:100%'
|
|
|
+ :interval='5000'
|
|
|
+ indicator-position='none'
|
|
|
+ :arrow='rotationImg.length == 1 ? "never":"always"'
|
|
|
+ @change='changePic'
|
|
|
+ >
|
|
|
+ <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
|
|
|
+ <img :src='item.url' alt style=' width: 100%; height: 100%;object-fit: container;' />
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ <el-carousel
|
|
|
v-else
|
|
|
style='height:100%;width:100%'
|
|
|
:interval='5000'
|
|
@@ -27,7 +39,7 @@
|
|
|
@change='changePic'
|
|
|
>
|
|
|
<el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
|
|
|
- <img :src='item.url' alt style=' width: 100%; height: 100%;object-fit: cover;' />
|
|
|
+ <img :src='item.url' alt style=' width: 100%; height: 100%;object-fit:inherit' />
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
</div>
|
|
@@ -42,21 +54,21 @@ export default {
|
|
|
fileList: [
|
|
|
{
|
|
|
name: 'food.jpeg',
|
|
|
- url: require('@/assets/imgs/2020.png')
|
|
|
+ url: require('@/assets/imgs/2020.png'),
|
|
|
},
|
|
|
{
|
|
|
name: 'food2.jpeg',
|
|
|
- url: require('@/assets/imgs/20200.png')
|
|
|
+ url: require('@/assets/imgs/20200.png'),
|
|
|
},
|
|
|
{
|
|
|
name: 'food.jpeg',
|
|
|
- url: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg'
|
|
|
+ url: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
|
|
|
},
|
|
|
{
|
|
|
name: 'food2.jpeg',
|
|
|
- url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
|
|
- }
|
|
|
- ]
|
|
|
+ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
|
|
|
+ },
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -64,7 +76,7 @@ export default {
|
|
|
if (this.type == 2) {
|
|
|
this.$emit('scan', val + 1)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
// 解决两张图片时,轮播顺序反向
|
|
|
created() {
|
|
@@ -76,7 +88,7 @@ export default {
|
|
|
if (this.type == 2) {
|
|
|
this.changePic(1)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|