vue stop event bug
2024-10-09 01:22:22
vue stop event bug
[Vue warn]: Error in v-on handler: "TypeError: e.prevntDefault is not a function"
Event-Modifiers
https://vuejs.org/v2/guide/events.html#Event-Modifiers
<template>
<!-- <div class="tools-hover-box-container" @click="clickFilter"> -->
<div class="tools-hover-box-container" @click.prevent="clickFilter">
<!-- <div class="tools-hover-box-container" @click.stop="clickFilter"> -->
<!-- <div class="tools-hover-box-container" @click.stop.prevent="clickFilter"> -->
<section class="tools-hover-box-item"
v-for="({name, list}, i) in cardsList"
:key="i">
<span class="tools-hover-box-category">{{name}}</span>
<ul class="tools-hover-box-list">
<li class="tools-hover-box-list-item"
data-hoverflag="true"
v-for="({icon, title, routerName}, j) in list"
:key="j"
@click.prevent="gotoRouter(routerName)">
<icon-svg class="item-icon-size" :icon-class="icon" />
<p class="item-title">{{title}}</p>
</li>
</ul>
</section>
</div>
</template>
clickFilter (e) {
console.log('e.target =', e.target, e);
const {
hoverflag: hoverFlag,
} = e.target.dataset;
// console.log(' e.target =', e.target, hoverFlag === undefined, typeof hoverFlag);
if(hoverFlag !== undefined) {
// goto
// this.$emit('click');
// console.log(' hoverFlag =', hoverFlag, typeof hoverFlag);
} else {
// ignore
// console.log(' hoverFlag =', hoverFlag, typeof hoverFlag);
e.prevntDefault();
e.stopPropagation();
}
},
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
最新文章
- Reveal1.5破解,iOS_UI调试利器Reveal最新版本破解方法
- iOS: Crash文件解析(一)
- Objective-C专题,是学习iOS开发的前奏(转)
- 在Ecshop后台打印订单页面将商品按货号排序
- 如何实现Android 中断线程的处理
- python发布模块的原理及部分讲解
- IOS之frame和bounds区别
- Weex-语法笔记 一
- js实现360度图片旋转
- UVa 10954,Add All
- 使用了旧版nuget的.net项目在git中的问题
- synchronized关键字的详细分析和代码实例
- Java高级开发工程师面试笔记
- HCNA-链路聚合(手工模式)
- c语言宏开关 使用
- Shiro权限管理框架
- CentOS 7 - 安装Oracle JDK8
- 设计模式 笔记 模版方法模式 Template Method
- 班级博客与coding地址
- C语言编译器不检查数组下标越界
热门文章
- Property or method ";previewUrl"; is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components,
- 陈思淼:阿里6个月重写Lazada,再造“淘宝”的技术总结
- cassandra权威指南读书笔记--读写数据
- LSTM机器学习生成音乐
- Codeforces Global Round 7 C. Permutation Partitions(组合数学)
- Codeforces Round #647 (Div. 2) C. Johnny and Another Rating Drop(数学)
- 【uva 10048】Audiophobia(图论--Floyd算法)
- 【noi 2.6_7624】山区建小学(DP)
- codeforces 630K Indivisibility (容斥原理)
- ACdream1414 Geometry Problem