10 2019 档案

摘要:数组: 根据VUE官网: 数组修改: 修改数组某个元素的值: Vue.set(this.items, indexOfItem, newValue); this.$set(this.items, indexOfItem, newValue); this.items.splice(indexOfItem 阅读全文
posted @ 2019-10-24 11:45 0恋晨曦0 阅读(7254) 评论(0) 推荐(0)
摘要://声明对象 data() { return { obj: { name: '黄国华' } } }, watch: { obj: { handler: function(newVal, oldVal) { console.log(newVal, oldVal); //因为对象为引用类型数据,所以新旧 阅读全文
posted @ 2019-10-24 11:14 0恋晨曦0 阅读(747) 评论(1) 推荐(1)
摘要:1.使用Vue.observable()进行状态管理 2.组件通信 组件通信11 3.vue高级组件之provide / inject vue高级组件之provide / injec11 provide() { return { changeName: this.changeName } }, me 阅读全文
posted @ 2019-10-23 16:39 0恋晨曦0 阅读(108) 评论(0) 推荐(0)