咦?我滚动条呢?
来源:3-2 滚动条组件
losting
2020-01-05 10:25:44
继各种报错之后,我滚动条又没了。。。。之前插槽slot写成solt把我人都给找懵了,大伙儿帮看看又是哪儿打错了
4回答
好帮手慕码
2020-01-06
同学你好,老师测试你的代码确实是有滚动条的(换浏览器测试也是有的),如下:
可能是其他的页面影响到了,同学可以先和源码对比一下,哪里写的有问题。如果还是没有找到问题的话,且考虑到代码比较多,建议同学新建提问,将相关代码(home/index.vue和scroll/index.vue)都粘贴至问答区,以便准确的帮助同学分析解决问题!
如果我的回答帮到了你,欢迎采纳,祝学习愉快~
好帮手慕码
2020-01-05
同学你好,老师测试同学提供的代码是有滚动条的,如下:
建议同学关闭项目后,重新启动测试一下(或者可以清除浏览器缓存)。
如果我的回答帮到了你,欢迎采纳,祝学习愉快~
losting
提问者
2020-01-05
<template> <swiper :options="swiperOption"> <swiper-slide> <slot></slot> </swiper-slide> <div class="swiper-scrollbar" v-if="scrollbar" slot="scrollbar"></div> </swiper> </template>
<script> import { swiper, swiperSlide } from "vue-awesome-swiper"; export default { name: "MeScroll", components: { swiper, swiperSlide }, props: { scrollbar: { type: Boolean, default: true } }, data() { return { swiperOption: { direction: "vertical", slidesPerView: "auto", freeMode: true, setWrapperSize: true, scrollbar: { el: this.scrollbar ? ".swiper-scrollbar" : null, hide: true } } }; } }; </script>
<style lang="scss" scoped> .swiper-container { overflow: hidden; width: 100%; height: 100%; } .swiper-slide { height: auto; } </style>
好帮手慕码
2020-01-05
同学你好,建议将代码粘贴至问答区进行提问,以便准确的帮助同学分析解决问题!
祝学习愉快~
相似问题