提交 f68ed30b 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 b4b30a37
......@@ -10,7 +10,7 @@
<van-sidebar style="width:180rpx;" class="sidebar" v-model="categoryIndex" >
<van-sidebar-item class="my-sidebar-item-font-size" @click="onChange(item.id)" v-for="(item,index) in categoryList" :key="item.id" :title="item.name" />
</van-sidebar>
<div class="right-content" >
<div class="right-content" ref="ss">
<van-list v-if="inited" :loading="good.loading" :finished="good.finished" finished-text="没有更多了"
offset="10" @load="onGoodLoad">
<div class="card-shop" v-for="item in good.list">
......@@ -60,6 +60,19 @@
import {reactive, toRefs, onMounted,getCurrentInstance} from 'vue';
export default {
onShow() {
uni.getStorage({
key:"listTop",
success: (res) => {
if(!!this.$refs.ss){
this.$nextTick(()=>{
this.$refs.ss.scrollTop=res.data
})
}
}
})
},
setup() {
const state = reactive({
loading: {
......@@ -89,6 +102,10 @@
});
},
goto(url) {
uni.setStorage({
key:"listTop",
data:this.$refs.ss.scrollTop||0
})
url && uni.navigateTo({ url })
},
cartAdd(data) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册