摘要: v-on 缩写:@ 事件修饰符 .stop - 调用 event.stopPropagation()。 //阻止冒泡 .prevent - 调用 event.preventDefault()。 //阻止事件默认行为 .capture - 添加事件侦听器时使用 capture 模式。 .self - 阅读全文
posted @ 2020-08-28 20:28 缔造cool 阅读(517) 评论(0) 推荐(1)
摘要: <div id="oop"> <button v-on:click.stop="hander">点击</button> //stop: 阻止冒泡(修饰符) <button v-on:click="hander(123,456,$event)">点击2</button> <button @click= 阅读全文
posted @ 2020-08-28 17:08 缔造cool 阅读(240) 评论(0) 推荐(0)
摘要: 放在 <style type="text/javascript"></style> 形式: [v-text]{ display: none; } //相当于自定义属性 MVVM设计思想: M(model) V(view) VM(View-Model) 分而治之,把不同的功能放到不同的模块 指令: ( 阅读全文
posted @ 2020-08-28 14:22 缔造cool 阅读(135) 评论(0) 推荐(0)