Commit 9c922aba authored by liumiss's avatar liumiss

2

parent aac4ced6
<template> <template>
<div class="cube-scroll-nav" :class="{'cube-scroll-nav_side': side}"> <div class="cube-scroll-nav" :class="{'cube-scroll-nav_side': side}">
{{disable}} <!-- {{disable}} -->
<cube-sticky ref="sticky" :pos="scrollY" @change="stickyChangeHandler"> <cube-sticky ref="sticky" :pos="scrollY" @change="stickyChangeHandler">
<cube-scroll <cube-scroll
ref="scroll" ref="scroll"
......
<template> <template>
<cube-scroll class="seller" :scroll-events="['scroll']" @scroll="onScrollHandle" :options="sellerScrollOptions">
<div class="container section"> <div class="container section">
<!-- <div style="height:500px;"></div> -->
<rating-select <rating-select
@select="onSelect" @select="onSelect"
@toggle="onToggle" @toggle="onToggle"
...@@ -12,6 +15,7 @@ ...@@ -12,6 +15,7 @@
<div class="empty_tips" v-show="!ratings || !ratings.length">暂无评价</div> <div class="empty_tips" v-show="!ratings || !ratings.length">暂无评价</div>
</div> </div>
</div> </div>
</cube-scroll>
</template> </template>
<script> <script>
...@@ -25,7 +29,11 @@ export default { ...@@ -25,7 +29,11 @@ export default {
positive: "推荐", positive: "推荐",
negative: "吐槽" negative: "吐槽"
}, },
selectType: 0 selectType: 0,
sellerScrollOptions: {
directionLockThreshold: 0,
click: false
},
}; };
}, },
mixins: [ratingMixin], mixins: [ratingMixin],
...@@ -40,7 +48,12 @@ export default { ...@@ -40,7 +48,12 @@ export default {
methods: { methods: {
onSelect(type) { onSelect(type) {
this.selectType = type; this.selectType = type;
} },
onScrollHandle(e) {
console.log(123);
// 内层滚动到顶部时,禁止滚动
this.$emit("scroll0");
},
} }
}; };
</script> </script>
\ No newline at end of file
<template> <template>
<cube-scroll class="seller" @scroll="onScrollHandle" :options="sellerScrollOptions"> <cube-scroll class="seller" :scroll-events="['scroll']" @scroll="onScrollHandle" :options="sellerScrollOptions">
<div class="seller-content"> <div class="seller-content">
<div class="overview bg-white"> <div class="overview bg-white">
<h1 class="title">{{seller.name}}</h1> <h1 class="title">{{seller.name}}</h1>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<span class="text">({{seller.ratingCount}})</span> <span class="text">({{seller.ratingCount}})</span>
<span class="text">月售{{seller.sellCount}}单</span> <span class="text">月售{{seller.sellCount}}单</span>
</div> </div>
<!-- <div style="height:500px;"></div> -->
<ul class="remark"> <ul class="remark">
<li class="block"> <li class="block">
<h2>起送价</h2> <h2>起送价</h2>
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
// saveToLocal(this.seller.id, "favorite", this.favorite); // saveToLocal(this.seller.id, "favorite", this.favorite);
}, },
onScrollHandle(e) { onScrollHandle(e) {
console.log(e); console.log(123);
// 内层滚动到顶部时,禁止滚动 // 内层滚动到顶部时,禁止滚动
this.$emit("scroll0"); this.$emit("scroll0");
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment