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 发布文章使用:只允许注册用户才可以访问!


最新文章

  1. Reveal1.5破解,iOS_UI调试利器Reveal最新版本破解方法
  2. iOS: Crash文件解析(一)
  3. Objective-C专题,是学习iOS开发的前奏(转)
  4. 在Ecshop后台打印订单页面将商品按货号排序
  5. 如何实现Android 中断线程的处理
  6. python发布模块的原理及部分讲解
  7. IOS之frame和bounds区别
  8. Weex-语法笔记 一
  9. js实现360度图片旋转
  10. UVa 10954,Add All
  11. 使用了旧版nuget的.net项目在git中的问题
  12. synchronized关键字的详细分析和代码实例
  13. Java高级开发工程师面试笔记
  14. HCNA-链路聚合(手工模式)
  15. c语言宏开关 使用
  16. Shiro权限管理框架
  17. CentOS 7 - 安装Oracle JDK8
  18. 设计模式 笔记 模版方法模式 Template Method
  19. 班级博客与coding地址
  20. C语言编译器不检查数组下标越界

热门文章

  1. Property or method &quot;previewUrl&quot; 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,
  2. 陈思淼:阿里6个月重写Lazada,再造“淘宝”的技术总结
  3. cassandra权威指南读书笔记--读写数据
  4. LSTM机器学习生成音乐
  5. Codeforces Global Round 7 C. Permutation Partitions(组合数学)
  6. Codeforces Round #647 (Div. 2) C. Johnny and Another Rating Drop(数学)
  7. 【uva 10048】Audiophobia(图论--Floyd算法)
  8. 【noi 2.6_7624】山区建小学(DP)
  9. codeforces 630K Indivisibility (容斥原理)
  10. ACdream1414 Geometry Problem