为了账号安全,请及时绑定邮箱和手机立即绑定

better-scroll 不能横向滚动,求助!

better-scroll 不能横向滚动,求助!

撒科打诨 2019-03-16 15:46:08
<div class="tab" ref="tab">  <div class="tab_content">       <div class="tab_item" v-for="(item,index) in menuList" :key="index">           {{item.name}}       </div>   </div></div>props: {// 首页传过来的tab的值menuList:null,},methods: {  onScroll(){        this.$nextTick(()=>{            if (!this.scroll) {                this.scroll=new BScroll(this.$refs.tab, {                     startX:0,                     click:true,                     scrollX:true,                     scrollY:false,                 })             }else{                this.scroll.refresh()             }         })     } },  mounted () {  this.onScroll() } <style>.tab{width: 7.54rem;height: 0.88rem;background: #fff;overflow: hidden;}.tab_item{display: inline-block;height: 0.88rem; line-height: 0.888rem;padding: 0 0.466667rem;} </style>
查看完整描述

2 回答

?
弑天下

TA贡献1818条经验 获得超8个赞

display: inline-block;height: 0.88rem;
line-height: 0.888rem;padding: 0 0.466667rem;


查看完整回答
反对 回复 2019-03-16
  • 2 回答
  • 0 关注
  • 1432 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号