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

阅读 1.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题