|
|
@@ -23,12 +23,32 @@
|
|
|
<img src="../../assets/img/swiper5.png" alt="" />
|
|
|
<p class="imgName">5555555555</p>
|
|
|
</div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <img src="../../assets/img/swiper6.jpg" alt="" />
|
|
|
+ <p class="imgName">222222222222222</p>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <img src="../../assets/img/swiper7.jpg" alt="" />
|
|
|
+ <p class="imgName">222222222222222</p>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <img src="../../assets/img/swiper8.jpg" alt="" />
|
|
|
+ <p class="imgName">222222222222222</p>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <img src="../../assets/img/swiper9.jpg" alt="" />
|
|
|
+ <p class="imgName">222222222222222</p>
|
|
|
+ </div>
|
|
|
+ <div class="swiper-slide">
|
|
|
+ <img src="../../assets/img/swiper10.jpg" alt="" />
|
|
|
+ <p class="imgName">222222222222222</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 如果需要导航按钮 -->
|
|
|
- <div class="swiper-button-prev"></div>
|
|
|
- <div class="swiper-button-next"></div>
|
|
|
</div>
|
|
|
+ <!-- 如果需要导航按钮 -->
|
|
|
+ <div class="swiper-button-prev"></div>
|
|
|
+ <div class="swiper-button-next"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -36,7 +56,7 @@
|
|
|
export default {
|
|
|
name: 'tab2',
|
|
|
components: {},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
// 这里存放数据
|
|
|
return {}
|
|
|
},
|
|
|
@@ -47,9 +67,9 @@ export default {
|
|
|
// 方法集合
|
|
|
methods: {},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created () {},
|
|
|
+ created() { },
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted () {
|
|
|
+ mounted() {
|
|
|
// eslint-disable-next-line
|
|
|
new Swiper(".swiper-container", {
|
|
|
slidesPerView: 1.5,
|
|
|
@@ -62,13 +82,13 @@ export default {
|
|
|
prevButton: '.swiper-button-prev'
|
|
|
})
|
|
|
},
|
|
|
- beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
- beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
- beforeUpdate () {}, // 生命周期 - 更新之前
|
|
|
- updated () {}, // 生命周期 - 更新之后
|
|
|
- beforeDestroy () {}, // 生命周期 - 销毁之前
|
|
|
- destroyed () {}, // 生命周期 - 销毁完成
|
|
|
- activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ beforeCreate() { }, // 生命周期 - 创建之前
|
|
|
+ beforeMount() { }, // 生命周期 - 挂载之前
|
|
|
+ beforeUpdate() { }, // 生命周期 - 更新之前
|
|
|
+ updated() { }, // 生命周期 - 更新之后
|
|
|
+ beforeDestroy() { }, // 生命周期 - 销毁之前
|
|
|
+ destroyed() { }, // 生命周期 - 销毁完成
|
|
|
+ activated() { } // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
}
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
@@ -108,18 +128,18 @@ export default {
|
|
|
// transform: translate(0, 0);
|
|
|
// }
|
|
|
/deep/.swiper-slide.swiper-slide-active {
|
|
|
- transform:scale(1.2) ;
|
|
|
+ transform: scale(1.2);
|
|
|
overflow: visible;
|
|
|
z-index: 9999 !important;
|
|
|
- }
|
|
|
- /deep/.swiper-slide.swiper-slide-active >img {
|
|
|
+ }
|
|
|
+ /deep/.swiper-slide.swiper-slide-active > img {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
// /deep/html:root{
|
|
|
// --swiper-theme-color: transparent !important;
|
|
|
// }
|
|
|
- .swiper-button-prev, .swiper-container-rtl .swiper-button-next{
|
|
|
+ .swiper-button-prev, .swiper-container-rtl .swiper-button-next {
|
|
|
width: 70px;
|
|
|
height: 70px;
|
|
|
border-radius: 50%;
|
|
|
@@ -127,10 +147,10 @@ export default {
|
|
|
border: 4px solid #fff;
|
|
|
color: #fff;
|
|
|
font-weight: 700;
|
|
|
- background-image:none;
|
|
|
+ background-image: none;
|
|
|
// background-image: url('../../assets/img/swiLeft.png') !important;
|
|
|
}
|
|
|
- .swiper-button-next, .swiper-container-rtl .swiper-button-prev{
|
|
|
+ .swiper-button-next, .swiper-container-rtl .swiper-button-prev {
|
|
|
width: 70px;
|
|
|
height: 70px;
|
|
|
border-radius: 50%;
|
|
|
@@ -138,18 +158,21 @@ export default {
|
|
|
border: 4px solid #fff;
|
|
|
color: #fff;
|
|
|
font-weight: 700;
|
|
|
- background-image:none;
|
|
|
+ background-image: none;
|
|
|
// background-image: url('../../assets/img/swiRight.png') !important;
|
|
|
}
|
|
|
- --swiper-theme-color: transparent;/* 设置Swiper风格 */
|
|
|
- --swiper-navigation-color: transparent;/* 单独设置按钮颜色 */
|
|
|
- --swiper-navigation-size: 30px;/* 设置按钮大小 */
|
|
|
- .imgName{
|
|
|
+ --swiper-theme-color: transparent;
|
|
|
+ /* 设置Swiper风格 */
|
|
|
+ --swiper-navigation-color: transparent;
|
|
|
+ /* 单独设置按钮颜色 */
|
|
|
+ --swiper-navigation-size: 30px;
|
|
|
+ /* 设置按钮大小 */
|
|
|
+ .imgName {
|
|
|
color: #fff;
|
|
|
margin-top: -35px;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
}
|
|
|
</style>
|