Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

uni-app开发微信小程序,点击后要1-2s后才弹出自定义picker-view,不知道是什么原因导致的?

uni-app开发微信小程序,页面上需要通过一个按钮点击弹出picker-view筛选城市,simple-address是自定义城市筛选组件(类mpvue-picker),当数据为空时,组件弹出很流畅,但是当页面有数据时(数据不多,就5条),点击按钮后,要1-2s后才弹出。merchant-item是自定义列表item组件。

<template>  
    <view class="merchant-list" v-if="hasLocation != null">  
        <view class="sticky-wraper">  
            <uni-search-bar class="search-bar" :cancelButton="false" @confirm="handleSearch" :radius="5" clearButton="none" placeholder="请输入店铺名"></uni-search-bar>  
            <view class="condition-wraper">  
                <view class="condition" @click="openAddress">{{locationName}}<text class="iconfont icon-arrowdown"></text></view>  
                <view class="condition sort">按距离排序</view>  
            </view>  
        </view>  
        <view class="items-container">  
            <template v-if="items.length > 0">  
                <merchant-item v-for="(item, idx) in items" :key="item.id" :item="item" />  
            </template>  
            <empty v-else primaryColor="#fff" />  
        </view>  
        <simple-address ref="simpleAddress" cancelColor="#3f3f3f" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onConfirm" themeColor="#bd9250"></simple-address>  
    </view>  
</template>

openAddress() {  
  this.$refs.simpleAddress.open();  
}

image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...