提交 1633b964 编写于 作者: C cangdu 提交者: GitHub

Merge pull request #100 from jawil/master

优化shop页面,让menu能随着食品的滑动能对应
......@@ -67,7 +67,7 @@
<transition name="fade-choose">
<section v-show="changeShowType =='food'" class="food_container">
<section class="menu_container">
<section class="menu_left" id="wrapper_menu">
<section class="menu_left" id="wrapper_menu" ref="wrapperMenu">
<ul>
<li v-for="(item,index) in menuList" :key="index" class="menu_left_li" :class="{activity_menu: index == menuIndex}" @click="chooseMenu(index)">
<img :src="getImgPath(item.icon_url)" v-if="item.icon_url">
......@@ -466,6 +466,10 @@
this.menuIndex = index;
}
})
let wrapMenuHeight = this.$refs.wrapperMenu.clientHeight;
let menuList=this.$refs.wrapperMenu.querySelectorAll('.activity_menu');
let el = menuList[0];
this.wrapperMenu.scrollToElement(el, 800);
})
},
//控制活动详情页的显示隐藏
......@@ -878,6 +882,7 @@
display: flex;
flex: 1;
overflow-y: hidden;
position: relative;
.menu_left{
background-color: #f8f8f8;
width: 3.8rem;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册