咦?我滚动条呢?
1 | <br> |
继各种报错之后,我滚动条又没了。。。。之前插槽slot写成solt把我人都给找懵了,大伙儿帮看看又是哪儿打错了
34
收起
正在回答 回答被采纳积分+1
4回答
losting
2020-01-05 17:00:22
1 2 3 4 5 6 7 8 | < template > < swiper :options = "swiperOption" > < swiper-slide > < slot ></ slot > </ swiper-slide > < div class = "swiper-scrollbar" v-if = "scrollbar" slot = "scrollbar" ></ div > </ swiper > </ template > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <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> |
1 2 3 4 5 6 7 8 9 10 | <style lang= "scss" scoped> .swiper-container { overflow : hidden ; width : 100% ; height : 100% ; } .swiper-slide { height : auto ; } </style> |
4.Vue与React高级框架开发
- 参与学习 人
- 提交作业 239 份
- 解答问题 10739 个
本阶段带你深入前端开发的肌理,通过ES6基础知识和前端主流高级框架的学习,助你快速构建企业级移动webAPP应用,进入职场的终极battle
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧