Meituan-Dianping / mpvue

基于 Vue.js 的小程序开发框架,从底层支持 Vue.js 语法和构建工具体系。
http://mpvue.com
MIT License
20.42k stars 2.07k forks source link

scroll-view 分享后列表突然自己返回顶部的问题 #858

Open jjshe opened 6 years ago

jjshe commented 6 years ago

scroll-view y轴滑动的页面 滑动了一部分之后 点击button分享 目前发现在iPhone6下 分享结束返回后 列表就返回顶部了。。。

shaonialife commented 6 years ago

你最好是贴一下你的scroll-view是怎么写的

jjshe commented 6 years ago

<scroll-view :scroll-y="isScroll" class="scroll-view" @scroll="scroll" @scrolltolower="lower" @bindscrolltoupper="upper">

  <!-- poi列表 begin -->
  <div class="poi__list__wrap">
    <!-- 首屏 begin -->
    <div class="poi__list__header" id="mjltest">
      <img class="poi__list__header__pic" src="../../../static/img/poi_list_bg1_w750_h1354_1x.jpg" :lazy-load="true" />

      <div :class="'poi__list__item__con--header' + index" v-for="(item, index) in topData" :key="index">
        <!-- poi点 begin -->
        <div :class="'poi__list__item--' + (subIndex + 1)" v-for="(subItem, subIndex) in item" :key="subIndex" @click="goToDetail(subItem.id)">
          <img class="poi__list__item__pic" v-if="subItem.treasure_status === '0' && subItem.pic" :src="subItem.pic + '@100Q_120w_120h_1pr_1c_1e'" :lazy-load="true" />
          <img class="poi__list__item__pic" v-else-if="subItem.treasure_status === '0'" :src="assetsHOST + 'list_box_def_w120_h120.png'" :lazy-load="true" />
          <img
            class="poi__list__item__pic"
            v-else-if="subItem.treasure_status === '1' || subItem.treasure_status === '5'"
            :src="assetsHOST + 'list_box_1_w120_h120.png'"
            :lazy-load="true"
          />
          <img
            class="poi__list__item__pic"
            v-else-if="subItem.treasure_status === '3'"
            :src="assetsHOST + 'list_box_3_w120_h120.png'"
            :lazy-load="true"
          />
          <img class="poi__list__item__pic" v-else :src="assetsHOST + 'list_box_2_w120_h120.png'" :lazy-load="true" />
          <img class="poi__list__item__icon" :src="assetsHOST + 'poi_type_' + subItem.new_type + '_w58_h58_1x.png'" :lazy-load="true" />
          <div class="poi__list__item__text">
            <img
              class="text__pic"
              v-if="subItem.treasure_status === '2' || subItem.treasure_status === '3'"
              :src="assetsHOST + 'poi_but_disable.png'"
              :lazy-load="true"
            />
            <img class="text__pic" v-else :src="assetsHOST + 'poi_but_available.png'" :lazy-load="true" />
            <b>{{subItem.name}}</b>
          </div>
        </div>
        <!-- poi点 end -->
      </div>

    </div>
    <!-- 首屏 end -->

    <!-- 列表 begin -->
    <div class="poi__list__main">
      <!-- <div class="empty__element" v-for="(item, index) in historyData" :key="index"></div> -->
      <div
        class="poi__list__main__wrap"
        v-for="(arrItem, arrIndex) in wrapData"
        :key="arrIndex"
      >
        <b class="poi__list__tips" v-if="arrItem === 0">加载中</b>
        <img class="poi__list__main__pic" v-if="arrItem !== 0" :src="assetsHOST + 'poi_list_bg' + (arrIndex % 2 + 2) + '_w750_h605_1x.jpg'" :lazy-load="true" />
        <div class="poi__list__item__con" v-if="arrItem !== 0" >
          <!-- poi点 begin -->
          <div
            :class="'poi__list__item--' + (index + 1)" v-for="(item, index) in arrItem"
            :key="index"
            @click="goToDetail(item.id)"
          >
            <img class="poi__list__item__pic" v-if="item.treasure_status === '0' && item.pic" :src="item.pic + '@100Q_120w_120h_1pr_1c_1e'" :lazy-load="true" />
            <img class="poi__list__item__pic" v-else-if="item.treasure_status === '0'" :src="assetsHOST + 'list_box_def_w120_h120.png'" :lazy-load="true" />
            <img
              class="poi__list__item__pic"
              v-else-if="item.treasure_status === '1' || item.treasure_status === '5'"
              :src="assetsHOST + 'list_box_1_w120_h120.png'"
              :lazy-load="true"
            />
            <img
              class="poi__list__item__pic"
              v-else-if="item.treasure_status === '3'"
              :src="assetsHOST + 'list_box_3_w120_h120.png'"
              :lazy-load="true"
            />
            <img class="poi__list__item__pic" v-else :src="assetsHOST + 'list_box_2_w120_h120.png'" :lazy-load="true" />
            <img class="poi__list__item__icon" :src="assetsHOST + 'poi_type_' + item.new_type + '_w58_h58_1x.png'" :lazy-load="true" />
            <div class="poi__list__item__text">
              <img class="text__pic" v-if="item.treasure_status === '2' || item.treasure_status === '3'" :src="assetsHOST + 'poi_but_disable.png'" :lazy-load="true" />
            <img class="text__pic" v-else :src="assetsHOST + 'poi_but_available.png'" :lazy-load="true" />
              <b>{{item.name}}</b>
            </div>
          </div>
          <!-- poi点 end -->
        </div>
      </div>
    <!-- loading begin -->
    <loading v-if="isShowLoading"></loading>
    <!-- loading end -->
    </div>
    <!-- 列表 end -->

    <div class="poi__list__tips" v-if="dataIsNone">已全部加载完毕</div>
  </div>
  <!-- poi列表 end -->
</scroll-view>
mpvue-bot[bot] commented 6 years ago

issue超过30天无更新或响应,7天后将自动关闭,如果问题状态有更新请及时更新issue