Browse Source

修改列表切换分类不回到顶部bug

jwyu 3 years ago
parent
commit
269a551ed3
2 changed files with 4 additions and 1 deletions
  1. 1 1
      pages-chart/allTypes.vue
  2. 3 0
      pages/chart/chart.vue

+ 1 - 1
pages-chart/allTypes.vue

@@ -172,7 +172,7 @@ export default {
       border-top-width: 0 !important;
     }
     .self-wrap{
-      margin-top: 60rpx;
+      // margin-top: 60rpx;
     }
   }
   

+ 3 - 0
pages/chart/chart.vue

@@ -34,6 +34,7 @@
       </view>
       <view class="chart-list-wrap" v-else>
         <drag
+          v-if="list.length>0"
           ref="chartDragIns"
           generic:item="chart-item"
           :columns="2"
@@ -164,6 +165,8 @@ export default {
     methods: {
       // 获取列表
       async getList(){
+        this.scrollTop=0
+        this.pageMetaScrollTop=0
         const res=await apiChartList({
           Page:this.page,
           Limit:20,