当前位置:网站首页>小程序:picker-view选择器快速滚动,确认时,”值显示错误“
小程序:picker-view选择器快速滚动,确认时,”值显示错误“
2022-07-16 21:26:00 【[email protected]】
一、picker-view简介
嵌入页面的滚动选择器。其中只可放置 picker-view-column组件,其它节点不会显示。

二、问题描述:
技术选型:uniapp。
这里做选择的时候,
滑动到某一个角色,点击确定,页面的数据没有更新,停留在之前的一个选项。

三、找到原因:
picker内容还在滚动时或滚动回弹动画还未结束时,
点击确定,关闭弹出的picker,数据无法及时更新,需等待一下,或手动触停滚动再点确定。
四、解决问题:
@pickstart="pickstart" @pickend="pickend"
<view class="w-picker-view" v-if="mode=='selector'">
<picker-view :indicator-style="itemHeight" @pickstart="pickstart" @pickend="pickend" :value="pickVal" @change="bindChange">
<picker-view-column>
<view class="w-picker-item" v-for="(item,index) in data" :key="index">{
{item.label}}</view>
</picker-view-column>
</picker-view>
</view>// 定义标记变量 isMoving
pickstart() {
this.isMoving = true;
},
pickend() {
this.isMoving = false;
},
pickerConfirm(e){
if (this.isMoving) {
console.log('运动中,不能点击哦')
return;
}
}经过测试问题成功解决。

五、欢迎交流指正,关注我,一起学习。
六、参考链接:
版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/snowball_li/article/details/125664502
边栏推荐
- 「接口自动化」软件测试涨薪核心技能、让薪资涨幅200%
- OOM简介
- 嘘!摸鱼神器,别让老板知道!| 语音实时转文本,时序快速出预测,YOLOv6在就能用,一行命令整理CSV | ShowMeAI资讯日报
- Only 22 years old! This "Post-00" doctor plans to work in 985 universities!
- C # network application programming, experiment 1: WPF exercise
- Supervised learning week 3: logistic regression option_ Lab harvest record
- [development tutorial 3] crazy shell arm function mobile phone - Introduction to the whole board resources
- ACM板子
- [arbre de décision] utilisation de l'arbre de décision pour le diagnostic du cancer du sein
- 中国碳陶复合材料市场调研与投资预测报告(2022版)
猜你喜欢

ROS create workspace process

T-infinite Road
![[paddleseg source code reading] about the trivial matter that the paddleseg model returns a list](/img/a4/bc61237e6557762487783f21602973.png)
[paddleseg source code reading] about the trivial matter that the paddleseg model returns a list

"Interface automation" software tests the core skills of salary increase and increases salary by 200%
![[development tutorial 3] crazy shell arm function mobile phone - Introduction to the whole board resources](/img/ca/9f5357fc09f5b71c626bc7f7cf36f3.png)
[development tutorial 3] crazy shell arm function mobile phone - Introduction to the whole board resources

7月献礼,买云盘就送特级桂七,仅限2个月,欲购从速

Cloud native: docker's practical experience (IV) deploying redis three master and three slave clusters on docker

App的回归测试,有什么高效的测试方法?

What will the future responsive web design look like under the endless demand of terminal device adaptation?

Nosklattack tool installation and use problem solving
随机推荐
20220715 domestic CONDA does not FQ the method of installing the latest version of pytoch
本周总结2
Original Rexroth proportional valve 4wrba10w64-2x/g24n9z4/m
Supervised learning week 3: logistic regression option_ Lab harvest record
11、摸清JVM对象分布
C # network application programming, Experiment 4: thread management exercise
Differences between user-defined hook and ordinary functions and function components
万字详解C语言文件
Chapter IV instruction system
ImportError: cannot import name ‘Imputer‘ from ‘sklearn. preprocessing‘
9、学会查看GC日志
性能测试中问题反思和心得
Deep analysis of fiboracci sequence
剑指 Offer II 119. 最长连续序列
作为一款时序数据库,TDengine 是如何实现并开源其分布式集群功能?
Nosklattack tool download and use
The difference between NPM and NPX
基于STM32的DHT11温湿度传感器设计
Reflection and experience on problems in performance testing
Summer study matlab notes