没有报错,而且浏览器检查也有,但是就是不显示
来源:1-2 Vue项目详情页 - 公用图片画廊组件拆分(1)
qq_慕丝1448851
2020-08-24 16:46:27
我用的是sass,差别也不大
----------------------------
<template>
<div class="container">
<div class="wrapper">
<swiper :options="swiperOptions">
<swiper-slide>
<img class="gallary-img" src="http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg">
</swiper-slide>
<swiper-slide>
<img class="gallary-img" src="http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png">
</swiper-slide>
<div class="swiper-pagination" slot="pagination" ></div>
</swiper>
</div>
</div>
</template>
<script>
export default {
name: 'CommonGallary',
data () {
return {
swiperOptions: {
pagination: '.swiper-pagination',
paginationType: 'fraction'
}
}
}
}
</script>
<style lang="scss" scoped>
.container >>> .swiper-pagination{
overflow: inherit;
}
.container{
display: flex;
flex-direction: column;
justify-content: center;
position: fixed;
right: 0;
top: 0;
left: 0;
bottom: 0;
background-color: #000;
z-index: 99;
.wrapper{
height: 0;
width: 100%;
padding-bottom: 100%;
.gallary-img{
width: 100%;
}
.swiper-pagination{
color: #fff;
bottom: -1rem;
}
}
}
</style>
1回答
同学你好,请问是指如下没有显示吗?
问题如下:类名写错了:
如果我的回答帮到了你,欢迎采纳,祝学习愉快~
相似问题
回答 2