BScroll warn 】EventEmitter has used unknown event type: “pullingUp“解决方法:看bs文档
导致错误的代码如下
这是老版本之前的使用方法,会报错上拉控制台不显示上拉加载更多import BScroll from "@better-scroll/core";this.scroll = BScroll(document.querySelector(".wrapper"), {probeType: 3,//默认pullUpLoad为flasepullUpLoad: true,});this.scroll.on("pullingUp", () => {console.log("上拉加载更多");setTimeout(() => {this.scroll.finishPullUp();// 2s之后下拉加载更多}, 2000);});
如图所示
解决方法
看文档
上拉https://better-scroll.github.io/docs/en-US/plugins/pullup.html#usage代码需要修改为
首先,通过静态方法安装插件BScroll.use()import BScroll from '@better-scroll/core'import PullUp from '@better-scroll/pull-up'BScroll.use(PullUp)this.scroll = BScroll(document.querySelector(".wrapper"), {pullUpLoad: true});this.scroll.on("pullingUp", () => {console.log("上拉加载更多");});
但是
下拉两次后出现bug,让调试,后来在看文档需要修改
bscroll.refresh()
将其改为
this.bscroll.refresh()
最后代码为
import BScroll from '@better-scroll/core'import PullUp from '@better-scroll/pull-up'BScroll.use(PullUp)this.scroll = BScroll(document.querySelector(".wrapper"), {pullUpLoad: true});this.scroll.on("pullingUp", () => {console.log("上拉加载更多");setTimeout(() => {this.scroll.finishPullUp();// 2s之后下拉加载更多}, 2000);});
成功了
BScroll warn 】EventEmitter has used unknown event type: “pullingUp“解决方法:看bs文档相关推荐
- EventEmitter has used unknown event type: “pullingUp“, should be oneof
错误: 原因: 上拉加载功能是一个插件. 因为上拉加载是一个插件,而script标签引入的js就要包括所有插件. 解决: 1.判断srcipt标签引入的js是否包含所有插件 如果引入了这个,代表没有任 ...
- linux 挂载错误 mount: unknown filesystem type LVM2_member 解决方法
系统启动到request_module: runaway loop modprobe binfmt-464c挂起 利用U盘系统,挂载硬盘出现:mount: unknown filesystem typ ...
- mount gives unknown filesystem type 'vboxsf' 解决方法
综述 mount gives unknown filesystem type 'vboxsf' 挂载的时候报错! 解决方法 安装virtual box的增强件: sudo apt-get instal ...
- AIX-vi操作-提示Unknown terminal type的问题解决方法
AIX-vi操作-提示Unknown terminal type的问题解决方法 AIX Version 5.3 $ vi /etc/profile linux: Unknown terminal ty ...
- QPainter::begin: Paint device returned engine == 0, type: 2 解决方法,在使用第三方库Qt可视化节点编辑器时
QT节点编辑器:https://github.com/paceholder/nodeeditor 在使用的时候,沿着对角线缩放节点会出现崩溃的情况 报出来的错误却是:Qt begin: Paint d ...
- MySQL 数据库mysqlbinlog使用问题:unknown variable ‘default-character-set=utf8‘.解决方法
问题展示: [root@localhost bin]# "/usr/local/mysql-8.0.11/bin/mysqlbinlog" "/usr/local/mys ...
- android webview file,Android WebView 不支持 H5 input type=file 解决方法
最近因为赶项目进度,因此将本来要用原生控件实现的界面,自己做了H5并嵌入webview中.发现点击H5中 input type="file" 标签 不能打开android资源管理器 ...
- Android NDK: WARNING: Ignoring unknown import directory:错误解决方法
Android NDK: WARNING: Ignoring unknown import directory:错误解决方法 添加NDK模块路径(参考,具体视情况): NDK_MODULE_PATH ...
- urllib.error.URLError:urlopen error unknown url type:https 解决办法
前言: 在用Python3做爬虫实验的时候报了这个错误:urllib.error.URLError: <urlopen error unknown url type: https> 原因是 ...
- dbvis 数据库连接工具-更新数据库驱动方法示例演示,驱动与数据库版本不匹配问题:Unknown system variable ‘query_cache_size‘解决方法
用 dbvis 工具连接数据库,报错信息如下: 报错的原因就是我要连接的数据库和我现在要使用的数据库驱动版本不匹配. An error occurred while establishing the ...
最新文章
- redis4-发布与订阅
- 【ZOJ - 4033】CONTINUE...? (思维,整体思想,分组思想)
- java找重复字符串_在java中怎样查找重复字符串
- 云管理不是巴别塔 从数据跨入云之路
- 某公司PIX 520防火墙系统和NAT的实施
- 读《现代软件工程--构建之法》所思
- mysql 添加字段和修改字段
- 一、linux内核源码分析(内核源码结构组成)
- eplan p8详细安装步骤文库_Win10系统安装Eplan Electric P8详细步骤
- Cocos2D场景编辑器
- 最全TCP/UDP端口号整理
- Navicat无法导入excel文件的异常处理
- IDEA社区版安装与概述
- QCC3040---Panic types
- matlab统计学分析函数
- 信息系统项目管理师核心考点(五十五)配置管理员(CMO)的工作
- 41. 整合RabbitMQ发送短信
- python大数据课程_Python课程(大数据系列)ElasticSearch从基础与实战视频课程
- 什么是ZOOM?ZOOM的作用是什么?
- win10系统下安装tensorflow总结