1、stop:阻止事件冒泡,顺序是执行顺序是div>body>document,js默认开启事件冒泡。e.stopPropagation()、e.stopImmediatePropagation() 阻止改dom所有该类型事件的冒泡。
2、self:阻止事件冒泡&&阻止事件捕获,div>body>document,document>body>div,默认是冒泡。
3、capture: 开启事件捕获,写在需要捕获的元素上,他会捕获内部元素的同类型事件 document>body>div // 默认关闭事件捕获,开启事件冒泡。addEventListener("click", this.Parent, {capture:true}); capture,true开启,反之关闭
4、once: 事件只触发一次就会被移除。addEventListener("click", this.Parent, {once:true}); once,true开启,反之关闭
5、prevent: 阻止事件的默认行为 e.preventDefault() e.defaultPrevented 查看默认阻止的状态,true:已阻止。addEventListener("click", this.Parent, {passive:true}); passive,true:阻止preventDefault函数调用,反之不阻止
6、native: 事件直接绑定到组件的原生节点上,<el-input @click.native/> click事件直接绑定在input元素上。
7、lazy: vue v-model 修饰符。修改语法糖的input事件为change。
8、number: vue 修饰符。把值转换为number类型。
9、trim: vue 修饰符。去除数值前后空格。
。。。。