6***@qq.com
6***@qq.com
  • 发布:2020-06-04 10:34
  • 更新:2021-01-18 17:15
  • 阅读:1199

【报Bug】nvue 跳转vue 嵌套list 会出现自动吸顶 安卓有问题 ios 暂时没有

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: w8

HBuilderX类型: 正式

HBuilderX版本号: 2.7.9

手机系统: Android

手机系统版本号: Android 10

手机厂商: 华为

手机机型: 一加

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

我把路由改成跳转nvue 页面就正常了 nuve-vue 不正常 nuve-nuve 正常

操作步骤:
    <view class="fixed">  
            <t-navbar :customBar="CustomBar" :statusBar="StatusBar" :bg-color="currentBg" :src="src"></t-navbar>  
        </view>  
        <list :id="pageId" class="page" :style="{'top':CustomBar + 'px'}" :show-scrollbar="false" :bounce="false">  
            <cell>  
                <view id="head" class="header">  
                    <view ref="top" :style="">  
                        <cu-bg :bg-color="currentBg"></cu-bg>  
                        <ad-banner :banner="adList" @change="changeBg" :style="{'margin-top': -CustomBar + 'px'}"></ad-banner>  
                        <channel :list="channelList" :menu="headIndustryList"></channel>  
                    </view>  
                </view>  
            </cell>  
            <cell>  
                <view class="tabs" id="body" :style="{height:pageHeight+'px'}">  
                    <view class="app-tabs">  
                        <scroll-view scroll-x class="tab-view " id="tab-bar" :scroll="false" :show-scrollbar="false" :scroll-into-view="scrollInto">  
                            <view class="tab-bar-item" v-for="(item,index) in navBarList" :id="item.id" :ref="'tabitem'+index" :key="item.id" @tap="tabSelect" :data-current="index">  
                                <text class="tab-title" :class="index==tabIndex?'cur-active-title':''">{{item.name}}</text>  
                                <text class="tab-sub-title" :class="index==tabIndex?'cur-active-sub-title':''">{{item.remark}}</text>  
                            </view>  
                        </scroll-view>  
                    </view>  

                    <swiper :current="tabIndex" id="tab-bar-view" class="swiper-box" @change="ontabchange">  
                        <swiper-item class="swiper-item" v-for="(tab,index) in navBarList" :key="index">  
                            <scroll-list class="swiper-page" ref="page" :pid="tab.id" :parentId="pageId" :hasSlot="index==0" :i="index"  
                             :index="tabIndex" :tabs="navBarList">  
                                <block v-if="index ===0">  
                                    <sale :sale-row="saleRow" :sale-column="saleColumn"></sale>  
                                </block>  
                            </scroll-list>  
                        </swiper-item>  
                    </swiper>  
                </view>  
            </cell>  
        </list>

预期结果:
    <view class="fixed">  
            <t-navbar :customBar="CustomBar" :statusBar="StatusBar" :bg-color="currentBg" :src="src"></t-navbar>  
        </view>  
        <list :id="pageId" class="page" :style="{'top':CustomBar + 'px'}" :show-scrollbar="false" :bounce="false">  
            <cell>  
                <view id="head" class="header">  
                    <view ref="top" :style="">  
                        <cu-bg :bg-color="currentBg"></cu-bg>  
                        <ad-banner :banner="adList" @change="changeBg" :style="{'margin-top': -CustomBar + 'px'}"></ad-banner>  
                        <channel :list="channelList" :menu="headIndustryList"></channel>  
                    </view>  
                </view>  
            </cell>  
            <cell>  
                <view class="tabs" id="body" :style="{height:pageHeight+'px'}">  
                    <view class="app-tabs">  
                        <scroll-view scroll-x class="tab-view " id="tab-bar" :scroll="false" :show-scrollbar="false" :scroll-into-view="scrollInto">  
                            <view class="tab-bar-item" v-for="(item,index) in navBarList" :id="item.id" :ref="'tabitem'+index" :key="item.id" @tap="tabSelect" :data-current="index">  
                                <text class="tab-title" :class="index==tabIndex?'cur-active-title':''">{{item.name}}</text>  
                                <text class="tab-sub-title" :class="index==tabIndex?'cur-active-sub-title':''">{{item.remark}}</text>  
                            </view>  
                        </scroll-view>  
                    </view>  

                    <swiper :current="tabIndex" id="tab-bar-view" class="swiper-box" @change="ontabchange">  
                        <swiper-item class="swiper-item" v-for="(tab,index) in navBarList" :key="index">  
                            <scroll-list class="swiper-page" ref="page" :pid="tab.id" :parentId="pageId" :hasSlot="index==0" :i="index"  
                             :index="tabIndex" :tabs="navBarList">  
                                <block v-if="index ===0">  
                                    <sale :sale-row="saleRow" :sale-column="saleColumn"></sale>  
                                </block>  
                            </scroll-list>  
                        </swiper-item>  
                    </swiper>  
                </view>  
            </cell>  
        </list>

实际结果:
    <view class="fixed">  
            <t-navbar :customBar="CustomBar" :statusBar="StatusBar" :bg-color="currentBg" :src="src"></t-navbar>  
        </view>  
        <list :id="pageId" class="page" :style="{'top':CustomBar + 'px'}" :show-scrollbar="false" :bounce="false">  
            <cell>  
                <view id="head" class="header">  
                    <view ref="top" :style="">  
                        <cu-bg :bg-color="currentBg"></cu-bg>  
                        <ad-banner :banner="adList" @change="changeBg" :style="{'margin-top': -CustomBar + 'px'}"></ad-banner>  
                        <channel :list="channelList" :menu="headIndustryList"></channel>  
                    </view>  
                </view>  
            </cell>  
            <cell>  
                <view class="tabs" id="body" :style="{height:pageHeight+'px'}">  
                    <view class="app-tabs">  
                        <scroll-view scroll-x class="tab-view " id="tab-bar" :scroll="false" :show-scrollbar="false" :scroll-into-view="scrollInto">  
                            <view class="tab-bar-item" v-for="(item,index) in navBarList" :id="item.id" :ref="'tabitem'+index" :key="item.id" @tap="tabSelect" :data-current="index">  
                                <text class="tab-title" :class="index==tabIndex?'cur-active-title':''">{{item.name}}</text>  
                                <text class="tab-sub-title" :class="index==tabIndex?'cur-active-sub-title':''">{{item.remark}}</text>  
                            </view>  
                        </scroll-view>  
                    </view>  

                    <swiper :current="tabIndex" id="tab-bar-view" class="swiper-box" @change="ontabchange">  
                        <swiper-item class="swiper-item" v-for="(tab,index) in navBarList" :key="index">  
                            <scroll-list class="swiper-page" ref="page" :pid="tab.id" :parentId="pageId" :hasSlot="index==0" :i="index"  
                             :index="tabIndex" :tabs="navBarList">  
                                <block v-if="index ===0">  
                                    <sale :sale-row="saleRow" :sale-column="saleColumn"></sale>  
                                </block>  
                            </scroll-list>  
                        </swiper-item>  
                    </swiper>  
                </view>  
            </cell>  
        </list>

bug描述:

首页nvue跳转Vue 会自动吸顶 但是首页nvue跳转nvue不会出现这个问题,请求帮忙解决

2020-06-04 10:34 负责人:DCloud_Android_DQQ 分享
已邀请:
DCloud_uniad_HDX

DCloud_uniad_HDX

Bug已确认

  • 6***@qq.com (作者)

    是bug 吗 我怎么改都没反应

    2020-06-04 17:43

  • 6***@qq.com (作者)

    大概啥时候能修复呀

    2020-06-08 09:27

DCloud_uniad_HDX

DCloud_uniad_HDX

HBuilderX 2.8.0+ Alpha版 已修复

3***@qq.com

3***@qq.com - 哈哈哈

2.8.3.20200728 版本仍然未修复

  • DCloud_Android_DQQ

    留一下 相关的复现代码吧。

    2020-08-13 19:54

  • 3***@qq.com

    回复 DCloud_Android_DQQ:

    跑是swiper-list,在cell上加一个点击事件,navigateTo 一个vue页面,从vue页面返回的时候 就会自动吸顶了

    onClick(){

    console.log("onClickonClickonClick")

    uni.navigateTo({

    url:"/pages/index/test/test"

    })

    },

    2020-08-14 20:23

Hi校园

Hi校园

还是会出现,nvue 在安卓端 时不时会出现自动吸顶 急急急
https://ask.dcloud.net.cn/question/115586

该问题目前已经被锁定, 无法添加新回复