当前位置:网站首页>Scroll View implémente la mise à jour déroulante (empêche onload d'entrer dans la page de mise à jour initiale du Shell Triggered pour déclencher la mise à jour déroulante pour True)
Scroll View implémente la mise à jour déroulante (empêche onload d'entrer dans la page de mise à jour initiale du Shell Triggered pour déclencher la mise à jour déroulante pour True)
2022-07-24 00:53:00 【Lumière de la route.】
Évitez l'entrée initiale dans la page parce que vous voulezrefresher-triggeredPourtrueN'utilisez pas correctement les problèmes de chargement déroulants
<scroll-view scroll-y="true" :style="{height:scrollH+'px'}"
:refresher-triggered="triggered" @scrolltolower="scrolltolower"
:refresher-threshold="100"
@refresherrefresh="onRefresh" @refresherrestore="onRestore"
@refresherabort="onAbort" refresher-background="linear-gradient( to right, #A0AAFF,#5E6EFF)"
@refresherpulling="refreshPullingTap" :refresher-enabled="isRefresher">
<view></view>
</scroll-view>data(){
return{
scrollH:0,
triggered:false,
_freshing:false,
isRefresher:true
}
},
methods:{
scrolltolower(e){
uni.$u.throttle(this.commonPage(), 1000)
},
onRefresh(){
if (this._freshing) return;
this._freshing = true;
this.findRecruitNewsList(0);
let tName=setTimeout(()=>{
clearTimeout(tName)
this.triggered = false;
this._freshing = false;
},1000)
},
onRestore(){
this.triggered = 'restore';
},
onAbort(){
},
refreshPullingTap(){
},
}Code clé:
onLoad(){
// Réglage d'un interrupteur de rafraîchissement déroulant personnalisé
this.isRefresher=false;
let t=setTimeout(() => {
clearTimeout(t);
this.triggered = true;
}, 1000)
let ts=setTimeout(()=>{
clearTimeout(ts);
this.isRefresher=true;
},3000)
},
边栏推荐
- EFCore高级Saas系统下单DbContext如何支持不同数据库的迁移
- Customize an object
- 工作3年的测试员跳槽后工资是原来的2倍,秘诀原来是......
- Network system experiment: solve the problem of Ping failure
- NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘*****‘
- Unity metaverse (I). Ready player me & blender customize your Avatar
- [QNX Hypervisor 2.2用户手册]9.1 配置变量
- Dataframe.groupby learning materials
- Testers who have been employed for 3 months are facing employment confirmation. Leaders: 1 year of work experience is packaged into 5 years, and the probation period is eliminated
- Tutorial on the principle and application of database system (049) -- MySQL query (XI): sub query
猜你喜欢

如何在自动化测试中使用MitmProxy获取数据返回?

Image processing 1:rgb888_ YCbCr444

Xilinx FPGA one way clock input two PLLs

Network system experiment: solve the problem of Ping failure

Testers who have been employed for 3 months are facing employment confirmation. Leaders: 1 year of work experience is packaged into 5 years, and the probation period is eliminated

Easy gene | target gene DNA methylation sequencing (target BS)

Difference between data index and label system of data warehouse

Analysis of the advantages of the LAAS scheme of elephant swap led to strong performance of ETOKEN

Image processing: Generation 3 × Window of 3

Small farmers also have big goals in the test, and the latest big bat interview summary (constantly updating...)
随机推荐
freemarker
QT入门篇(2.1初入QT的开始第一个程序)
A good habit to develop when writing SQL
Summary of polynomial commitment schemes
Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)
MariaDB database upgrade version
First knowledge of C language functions
工作3年的测试员跳槽后工资是原来的2倍,秘诀原来是......
Interviewer: if the order is not paid within 30 minutes after it is generated, it will be automatically cancelled. How to realize it?
Method of C language annotation
黑马程序员-接口测试-四天学习接口测试-第四天-Postman读取外部数据文件,读取数据文件数据,iHRM项目实战,员工管理模块,添加员工,批量运行测试用例,生成测试报告,
C language book recommendation
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘*****‘
Dataframe.groupby learning materials
js的相关知识
Application of SCA on devsecops platform
Flutter | the easiest way to add header and footer to listview
How to speed up matrix multiplication -- optimizing GEMM (CPU single thread)
Tutorial on principles and applications of database system (043) -- MySQL query (V): Sorting Query Results
Overview of data model design method