上一页 1 ··· 4 5 6 7 8
摘要: const oldObj = { name:"哈默", age:20, colors:['orange','green','blue'], friend:{ name:"小夏" } } // const newObj1 = oldObj; // newObj1.name='小野'; // conso 阅读全文
posted @ 2022-03-09 14:21 踏浪小鲨鱼 阅读(296) 评论(0) 推荐(0)
摘要: State getters mutations actions modules State 类似于组件中data,存放数据 Mutations 类似于组件中 methods Actions 提交 mutations 的 Modules 把 以上4个属性再细分,让仓库更好管理 Vuex 是单向数据流 阅读全文
posted @ 2022-03-09 11:18 踏浪小鲨鱼 阅读(787) 评论(0) 推荐(0)
摘要: beforeCreate Created beforeMount Mounted beforeUpdate Updated beforeDestroy Destroyed 一旦进入到页面或者组件,会执行哪些生命周期,顺序 BeforeCreate Created beforeMount Mounte 阅读全文
posted @ 2022-03-09 10:46 踏浪小鲨鱼 阅读(63) 评论(0) 推荐(0)
摘要: 判断是数组的方法 var arr = [1,2,3] 第一种: Array.isArray(arr) 第二种:arr instanceof Array (instanceof 是判断原型上是否继承数组的原型) 第三种:Object.prototype.toString.call(arr).index 阅读全文
posted @ 2022-03-08 18:11 踏浪小鲨鱼 阅读(95) 评论(0) 推荐(0)
摘要: 常见的几种变量交换方法 // var a = 3, b = 5 //1 中间变量 // var c = b; // b = a; // a = c; //2 加减法 // a = a + b // b = a - b; // a = a - b; //3 数组法 // a = [a,b]; // b 阅读全文
posted @ 2022-03-08 13:53 踏浪小鲨鱼 阅读(248) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8