1***@qq.com
1***@qq.com
  • 发布:2020-08-25 10:05
  • 更新:2020-08-25 10:05
  • 阅读:665

【报Bug】swiper组件在特定情况下不会渲染

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 2.8.8

手机系统: Android

手机系统版本号: Android 5.0

手机厂商: 模拟器

手机机型: /

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

父组件:

<component v-for="(item, index) in order" :key="index" v-bind:is="item.style" :url="item.url" :id="item.id"></component>  

子组件:

<template>  
    <view>  
        <div class="title">{{ list.name }}</div>  
        <swiper class="swiper-box" :autoplay="true" :circular="true" next-margin="190rpx">  
            <swiper-item v-for="(item, index) in showList" :key="index" class="swiper-item">  
                <view>  
                    <view v-for="(temp, index2) in item" :key="index2" class="itembox" @click="godetail(temp.game_id)">  
                        <view class="leftbox">  
                            <img :src="temp.icon" alt="icon" class="img" />  
                        </view>  
                        <view class="rightbox">  
                            <text class="rightbox_title">{{ temp.gamename }}</text>  
                            <view class="box_detail">  
                                <view>  
                                    <text>{{ temp.type[0] }} </text>  
                                    <text decode="true">  {{ temp.type[1] ? '·' + temp.type[1] : '' }}  
                                    </text>  
                                </view>  

                                <text class="box_text">{{ temp.size }}</text>  
                                <text class="box_playnum">{{ temp.user_cnt | playNum }}人在玩</text>  
                            </view>  
                            <view class="box_bottom">  
                                <image src="../../static/img/hot/tag_recharge_icon.png" mode="aspectFit" class="icon"></image>  
                                <text class="recharge">{{ temp.tag_recharge }}</text>  
                                <image src="../../static/img/hot/tag_vip_icon.png" mode="aspectFit" class="icon"></image>  
                                <text class="vip">{{ temp.tag_sendvip }}</text>  
                                <image src="../../static/img/hot/tag_rebate_icon.png" mode="aspectFit" class="icon"></image>  
                                <text class="rebate">{{ temp.tag_rebate }}</text>  
                            </view>  
                        </view>  
                    </view>  
                </view>  
            </swiper-item>  
        </swiper>  
    </view>  
</template>

操作步骤:

在app启动后快速下拉

预期结果:

swiper显示正常

实际结果:

swiper显示不正常

bug描述:

在app启动完成页面加载时进行快速的下拉,有概率swiper组件无法正常显示,需要在app启动后等待一下才会正常显示,手机性能越差概率越大,详见视频

2020-08-25 10:05 负责人:无 分享
已邀请:

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