优化易购页面的页面布局
This commit is contained in:
parent
295872ccf1
commit
31dc706eed
@ -315,11 +315,11 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.CateList_Box {
|
.CateList_Box {
|
||||||
width: 71.5%;
|
width: 95%;
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* position: relative; */
|
position: relative;
|
||||||
position: fixed;
|
/* position: fixed; */
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
padding: 20rpx 10rpx;
|
padding: 20rpx 10rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
@ -368,7 +368,7 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.CateIte {
|
.CateIte {
|
||||||
margin-top: 80rpx;
|
/* margin-top: 80rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.CateInfo {
|
.CateInfo {
|
||||||
|
|||||||
@ -63,7 +63,8 @@
|
|||||||
{{ item.category_name }}
|
{{ item.category_name }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Con_right" v-if="tagList1.length > 0">
|
<view class="Con_right" v-if="tagList1.length > 0" ref="conRightRef"
|
||||||
|
:style="{ overflow: cateListShow ? 'hidden' : 'auto' }">
|
||||||
<view class="CateList_Box" :class="cateListShow ? 'bgf' : ''">
|
<view class="CateList_Box" :class="cateListShow ? 'bgf' : ''">
|
||||||
<view class="CateList" ref="cateListRef">
|
<view class="CateList" ref="cateListRef">
|
||||||
<view class="CateList_Item" v-for="(item, index) in tagList" :key="item.id"
|
<view class="CateList_Item" v-for="(item, index) in tagList" :key="item.id"
|
||||||
@ -152,7 +153,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="GGList" v-if="items.isShow">
|
<view class="GGList" v-if="items.isShow">
|
||||||
<view class="GGItem" v-for="ite in items.commodity_goods_info_list" :key="ite.id" @click="goods(ite,items)">
|
<view class="GGItem" v-for="ite in items.commodity_goods_info_list" :key="ite.id"
|
||||||
|
@click="goods(ite, items)">
|
||||||
<view class="GGItem_Image">
|
<view class="GGItem_Image">
|
||||||
<view class="tag tag-img" v-if="ite.is_same_day">当日达</view>
|
<view class="tag tag-img" v-if="ite.is_same_day">当日达</view>
|
||||||
<image :src="picUrl + ite.commodity_pic" mode="aspectFill"></image>
|
<image :src="picUrl + ite.commodity_pic" mode="aspectFill"></image>
|
||||||
@ -227,6 +229,7 @@ export default {
|
|||||||
search: "",
|
search: "",
|
||||||
value: "1",
|
value: "1",
|
||||||
cateListShow: false,
|
cateListShow: false,
|
||||||
|
scrollTop: 0,
|
||||||
conRightElement: null,
|
conRightElement: null,
|
||||||
iconList: [
|
iconList: [
|
||||||
{
|
{
|
||||||
@ -325,6 +328,20 @@ export default {
|
|||||||
//顶部分类点击
|
//顶部分类点击
|
||||||
changeCateListShow() {
|
changeCateListShow() {
|
||||||
this.cateListShow = !this.cateListShow;
|
this.cateListShow = !this.cateListShow;
|
||||||
|
// 当cateListShow展开时,禁止Con_right滚动
|
||||||
|
if (this.conRightRef) {
|
||||||
|
if (this.cateListShow) {
|
||||||
|
// 保存当前滚动位置
|
||||||
|
this.scrollTop = this.conRightRef.scrollTop;
|
||||||
|
} else {
|
||||||
|
// 恢复滚动位置
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.conRightRef) {
|
||||||
|
this.conRightRef.scrollTop = this.scrollTop || 0;
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//选择右下角分类
|
//选择右下角分类
|
||||||
checkItem(index) {
|
checkItem(index) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user