Authored by zhangwenxue

商品详情: 删除cube-scroll

... ... @@ -2,7 +2,7 @@
<div class="layout">
<LayoutHeader class="layout-header" :show-back="true" :title="'\u200E'"></LayoutHeader>
<div class="layout-context fixscroll">
<cube-scroll ref="pageScroll">
<div class="cube-scroll-wrapper" ref="pageScroll">
<div class="slide">
<cube-slide ref="slide" :data="imageList">
<cube-slide-item v-for="(item, index) in imageList" :key="index">
... ... @@ -52,7 +52,7 @@
<div class="recommend" v-if="recommend"><h2>相关推荐</h2>
<product-list :list="recommend" priceKey="price"/>
</div>
</cube-scroll>
</div>
<div class="footer">
<div class="heart">
<div class="icon-fav" v-if="isFav" @click="_toggleFav(false)">
... ... @@ -96,7 +96,7 @@
</template>
<script>
import { Button, Slide, Scroll, Popup } from 'cube-ui';
import { Button, Slide, Popup } from 'cube-ui';
import { get } from 'lodash';
import { createNamespacedHelpers, mapGetters } from 'vuex';
... ... @@ -131,7 +131,6 @@ export default {
'cube-button': Button,
'cube-slide': Slide,
'cube-slide-item': Slide.Item,
'cube-scroll': Scroll,
'cube-popup': Popup,
},
props: {
... ... @@ -210,7 +209,10 @@ export default {
return store.dispatch('product/fetchProductInfo', {productId});
},
activated() {
this.$refs.pageScroll && this.$refs.pageScroll.scrollTo(0, 0, 0);
if (this.$refs.pageScroll) {
this.$refs.pageScroll.scrollTop = 0;
}
this.loadData(this.productId);
this.refresh();
},
... ... @@ -654,16 +656,8 @@ export default {
}
.cube-scroll-wrapper {
height: auto;
flex: 1 0 0;
// 当前页面上面白色背景,底部recommend的f2f2f2, scroll的moment功能会使用cube-scroll-wrapper的顶部及底部做空内容填充
background: linear-gradient(to bottom, #fff 0, #f2f2f2 100%);
// 这里覆盖cube-scroll-wrapper渐变背景
/deep/ .cube-scroll-content {
background: #fff;
}
overflow: scroll;
}
.footer {
... ...