GUNDAM
GUNDAM
  • 发布:2019-08-25 13:31
  • 更新:2019-09-09 12:14
  • 阅读:1572

【报Bug】nvue ios端 swiper高度动态变化 切换后 显示一下 立即跳回前面一个 安卓无此问题

分类:nvue

详细问题描述

(DCloud产品不会有明显的bug,所以你遇到的问题大都是在特定环境下才能重现的问题,请仔细描述你的环境和重现方式,否则DCloud很难排查解决你的问题)

[内容]nvue ios端 swiper高度动态变化 切换后 显示一下 立即调回前面一个 安卓无此问题

重现步骤

[步骤]

<template>  
    <view>  
        <view :style="{marginTop:(statusBarHeight+47)+'px'}">  
            <swiper class="slider" :indicator-dots="true"  indicator-active-color="#FFFFFF" :infinite="false"   
             @change="swiperchange" :style="{height:imgheight+'rpx'}">  
                <swiper-item class="frame" v-for="(item,index) in imglist"  :key="index">  
                    <image mode="aspectFit" :style="{height:item.height+'rpx'}" class="chooseimg" :src="item.src" @tap="previewimg(item)"></image>  
                </swiper-item>  
            </swiper>  
        </view>  
        <view>  
        </view>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                statusBarHeight: 44,  
                imgheight:0,  
                imglist:[],  
            }  
        },  
        methods:{  
            swiperchange(e){  
                console.log(e.detail.current);  
                this.imgheight = this.imglist[e.detail.current].height;  
                this.index = e.detail.current+1;  
            }  
        },  
        onLoad(optins){  
            console.log(optins);  
            var app = getApp().globalData;  
            this.$store = app.$store;  
            this.statusBarHeight = app.$store.getters.systeminfo('statusBarHeight');  
            var imglist = this.$appUtils.getitems('photolist');  
            this.imglist = JSON.parse(imglist);  
            this.num = this.imglist.length;  
            this.imgheight = this.imglist[0].height;  
            console.log(this.imglist);  
        }  
    }  
</script>  

<style scoped>  
.mypublshs{  
    position:fixed;  
    right:20rpx;  
    bottom:80rpx;  
}  
.slider{  
    width:750rpx;  
}  
.chooseimg{  
    width:750rpx;  
}  
.locationview{  
 font-size:32rpx;  
 font-weight:500;  
}  
.scrollviews{  
  width:620rpx;   
  /*#ifdef MP-WEIXIN */  
  flex-direction:row;  
  white-space: nowrap;  
  height:65rpx;  
  /*#endif */  
  /*#ifdef APP-PLUS-NVUE */  
  flex-direction:row;  
  /*#endif */  
}  
.addheights{  
    height:70rpx;  
}  
.tagcontainer{  
    background-color:#FFFFFF;  
    border-radius:20rpx;  
    margin-right:20rpx;  
    margin-bottom:15rpx;  
    margin-top:15rpx;  
    padding:10rpx 20rpx;  
    /*#ifdef MP-WEIXIN */  
    display: inline-block;  
    /*#endif */  
    flex-direction: row;  
    flex-wrap: wrap;  
    justify-content: flex-start;  
    align-items: center;  
    box-shadow:2rpx 5rpx 10rpx #c7c7cc;  
}  
.chtags{  
    color:#ed4b13;  
    font-size:28rpx;  
}  
</style>  

[结果]当前显示一下 自动跳到前面一个

[期望]保存当前滑动

[如果语言难以表述清晰,拍一个视频或截图,有图有真相]

IDE运行环境说明

[HBuilder 或 HBuilderX。如果你用其他工具开发uni-app,也需要在此说明]

[IDE版本号]hbuilderx alpha 2.2.4

[windows版本号]win10

[mac版本号]

uni-app运行环境说明

[运行端是h5或app或某个小程序?]app

[运行端版本号]

[项目是cli创建的还是HBuilderX创建的?如果是cli创建的,请更新到最新版cli再试]HBuilderX创建的

[编译模式是老模板模式还是新的自定义组件模式?]自定义组件模式

App运行环境说明

[Android版本号]

[iOS版本号]ios12.2

[手机型号]iphone xr

[模拟器型号]

附件

[IDE问题请提供HBuilderX运行日志。菜单帮助-查看运行日志,点右键打开文件所在目录,将log文件压缩成zip包上传]

[App问题请提供可重现问题的代码片段,你补充的细一点,问题就解决的快一点]

[App安装包或H5地址]

[可重现代码片段]代码如上 ios完全可以重现

联系方式

[QQ]1927814063@qq.com

2019-08-25 13:31 负责人:无 分享
已邀请:

最佳回复

DCloud_iOS_XHY

DCloud_iOS_XHY

感谢反馈 bug 已确认,下个版本会修复

  • GUNDAM (作者)

    2019-09-04 17:27

DCloud_App_Array

DCloud_App_Array

此问题已在HBuilderX2.2.5(alpha)版本修复。

  • GUNDAM (作者)

    感谢 已测试 没有问题 完美解决

    2019-09-09 13:40

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