文章分类 -  vue

摘要:javaScript高阶函数 filter()(过滤操作) const nums = [10,20,30,40,50] // 执行nums.length()次 let newNums = nums.filter(function(n){ // filter中的回调函数必须返回一个布尔值,为true时 阅读全文
posted @ 2022-06-02 08:31 默π 阅读(39) 评论(0) 推荐(0)
摘要:v-on(事件监听) 基本使用 作用:绑定事件监听 缩写:@ 绑定方法传递事件,需要同时传入某个参数以及event,可以通过$event传入事件 v-on的修饰符 停止冒泡 @click.stop="doThis":调用event.stopPropagation() 阻止默认行为 @click.pr 阅读全文
posted @ 2022-05-26 11:45 默π 阅读(38) 评论(0) 推荐(0)
摘要:v-bind 基本使用 作用:动态绑定属性 缩写:冒号 高级使用 动态添加类 对象语法 :class="{ 类名1: boolean, 类名2: boolean }" 解释:类名1或类名2的boolean值为true,该类将被加载到目标结点;为false,则不会被加载到目标结点。 注释:最终结点上的 阅读全文
posted @ 2022-05-24 14:18 默π 阅读(37) 评论(0) 推荐(0)