


This time I will bring you the conflict handling method between mint-ui loadmore pull-up loading and pull-down refresh. What are the precautions for handling the conflict between mint-ui loadmore pull-up loading and pull-down refresh? The following is a practical case, let’s take a look.
Problems encountered:
This page is a dual-tab linkage. All four parts require pull-up loading and pull-down refresh functions. The loadmore plug-in of mint-ui is used. After adding pull-up loading respectively, only the last one has this.$refs. loadmore.onTopLoaded();
andthis.$refs.loadmore.on<a href="http://www.php.cn/wiki/906.html" target="_blank">Bottom</a>Loaded();
Valid, the other three are invalid. These two sentences mean that query needs to be called once for relocation
Analysis of the reason:
First of all, these four modules are used
<mt-loadmore> <ul> <li> <p> <input> <label></label> </p> <p> </p> <p>{{item.a}}</p> <p>{{item.b}}</p> <p> </p> <p>¥{{item.c}}</p> </li> </ul> </mt-loadmore>
top-method, bottom-method, and bottom-all-loaded are given different event names respectively. The first two events represent pull-down and pull-up respectively. If the third one is true, bottomMethod will not be loaded again. Triggered, generally when entering the page we default to false
When calling the interface , the judgment of canceling the loading is made after the success. Here you can give the interface method a type value. If the type is top1, it proves that the ongoing pull-down refresh execution this.$refs.loadmore1 .onTopLoaded();
, the same applies to pull-up loading, and the other three modules
if(type=='top1'){ this.$refs.loadmore1.onTopLoaded(); }else if(type=='bottom1'){ this.$refs.loadmore1.onBottomLoaded(); }
When you get here, the problem described at the beginning will appear,
Solution
I made a lot of attempts at the beginning, such as using v-if to hide the other three modules when one module is displayed, but different problems always occurred. Later, the parameters after ref in ref="loadmore" were used in four modules. For example, the distinction is loadmore1, loadmore2..., here is how I understand it, ref The function here is to specify an index ID for the subcomponent, which is similar to the id of the dom element. The id name cannot be the same, so we change the ref to a different parameter and the problem is solved,
Attached is the Vue official website linkhttps://vuejs.org/
mint-ui:https://mint-ui.github.io/docs/#/en2/loadmore
PS: Mint-ui loadmore component attention issues
loadTop(){ this.$store.dispatch('getNewsList',{channelId:this.id,page:0,size:this.size}); this.$refs.loadmore.onTopLoaded(); },
For example, when doing pull-down refresh, remember to add
this.$refs.loadmore.onTopLoaded();
in the pull-down refresh function. This line of code, otherwise the loading will always be displayed after the drop-down loading, and the loading will not be completed.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
The above is the detailed content of mint-ui loadmore pull-up loading and pull-down refresh conflict handling method. For more information, please follow other related articles on the PHP Chinese website!

当您在iPhone上浏览网页时,加载的内容会暂时存储,只要浏览器应用保持打开状态。然而,网站会定期更新内容,因此刷新页面是清除旧数据并查看最新发布内容的有效方式。这样,您可以始终获得最新的信息和体验。如果您想在iPhone上刷新页面,以下帖子将向您解释所有方法。如何在Safari上刷新网页[4种方法]有几种方法可以刷新您在iPhone上的Safari浏览器App上查看的页面。方法1:使用“刷新”按钮刷新您在Safari浏览器上打开的页面的最简单方法是使用浏览器标签栏上的“刷新”选项。如果Safa

您的Windows11/10PC上的F5键是否无法正常工作?F5键通常用于刷新桌面或资源管理器或重新加载网页。然而,我们的一些读者报告说,F5键正在刷新他们的计算机,并且无法正常工作。如何在Windows11中启用F5刷新?要刷新您的WindowsPC,只需按下F5键即可。在某些笔记本电脑或台式机上,您可能需要按下Fn+F5组合键才能完成刷新操作。为什么F5刷新不起作用?如果按下F5键无法刷新您的电脑或在Windows11/10上遇到问题,可能是由于功能键被锁定所致。其他潜在原因包括键盘或F5键

页面刷新在我们日常的网络使用中非常常见,当我们访问一个网页后,有时候会遇到一些问题,比如网页加载不出来或者显示不正常等。这时候我们通常会选择刷新页面来解决问题,那么如何快速地刷新页面呢?下面我们就来探讨一下页面刷新的快捷键。页面刷新快捷键是一种通过键盘操作来快速刷新当前网页的方法。在不同的操作系统和浏览器中,页面刷新的快捷键可能有所不同。下面我们以常见的W

react页面传值刷新后值消失的解决办法:1、刷新页面,查看state里面的数据是否会清空;2、通过“const name = location.query.name;const id = location.query.id;”方法在跳转链接中增加参数,即可在实现传参的同时刷新页面后数据不会丢失。

键盘刷新快捷键是哪个随着电脑技术的发展,键盘成为我们日常工作和生活中不可或缺的设备。键盘的功能远不止输入文字,它也常常用来操作电脑的各种功能,提高我们的工作效率。而键盘的快捷键更是让我们能够更快速、便捷地完成各种操作。在平时使用电脑的过程中,我们经常会遇到需要页面刷新的情况。当我们打开网页或者软件运行时,有时候页面会出现卡顿或者无法加载的情况,这时候刷新页面

近期有客户在应用Win10系统软件的情况下,发觉有时候桌面会一直在全自动刷新,如何也根本停不下来,并且在大家视频观看听歌时也一直在刷,十分影响到应用感受,那麼计算机开机无线网络刷新怎么办呢,下边小编就把Win10开机桌面无限刷新的处置方式告知大伙儿。计算机开机无线网络刷新该怎么办?1、大家进到桌面后,鼠标点击点一下菜单栏标志。2、在开启的界面中选择【资源管理器】。3、进入页面后,大家点一下【windows任务管理器】,选择【结束任务】。4、进行后返回桌面鼠标右键选择菜单栏。5、这时大家点一下【运

刷新是我们使用电脑时经常会进行的操作,通过刷新可以快速显示我们对界面、显示、图标等属性的设置情况,但是很多朋友在使用win11时发现右键菜单中没有刷新了,其实这是因为win11增加了一个菜单,需要先进入才可以刷新。win11怎么右键刷新1、在win11系统中,右键菜单进行了更改,我们右键点击空白处将无法找到刷新。2、取而代之的是,我们需要在右键菜单中找到最下方的“showmoreoptions”3、进入“showmoreoptions”之后,就可以找到刷新了。4、此外,其实我们不需要使用右键刷新

如何在Vue项目中使用路由实现页面刷新和缓存控制?在Vue项目开发中,使用路由实现页面刷新和缓存控制是非常常见的需求。本文将介绍如何在Vue项目中使用路由来实现页面刷新和缓存控制,并给出相应的代码示例。路由配置首先,在Vue项目中需要使用vue-router来进行路由配置。可以通过npm安装vue-router,并在main.js中进行引入和配置。impor


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
