1基础部分https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https:///xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/6766220019...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...https://xueqiu.com/4626333155...1.1v-if与v-showv-ifhidden隐藏节点的区别,v-showhiddencss显示:无显示和隐藏频繁切换建议使用v-show,频率较少建议使用v-if1.2的区别watch和computedwatch监控当数据发生变化时,computed会从现有数据中计算出新的数据。watch没有缓存,computed有缓存。watch不能是异步的,但是computed可以是异步的。watch是一对多的关系,而computed是多对一的关系。1.3watch的深度监控handler还有一个deep参数实现深度监控watch引用类型没有oldval参数的作用1.4v-for循环关键:Vue需要dom进行patch(差异比较)重要识别,使用auniquekeyvalue可以有效优化vuedomtemplaterenderingkey建议使用dataunique注意iddocid避免使用index和random1.5事件vue事件是原生的js事件挂载到当前元素stoponceprevent事件修饰符.up.enter.esc.spacevue事件组件是原生js事件挂载到当前元素stoponcebuttonmodifier.left.right.bottom.top1.6组件传参propsparentpasschild$emitchildpassparentbus=newVue()this.on(name,e=>)2.这是。on(name,e=>{})2.this.on(name,e=>)2.this.emit(name,data)this.$off(name)1.7生命周期顺序创建:从外到内创建,从内到外parentbeforeCreatedsonbeforecreatedsonmouredparentmountedupdate:从外到内,从内到外sonbeforeupdiatesonupdatedparentupdated2进阶部分2.1$set(name,index,value)更新name数据的索引项,强制更新view2.2$nextTickdom节点渲染完成的回调,如果获取到更新数据,可以使用,this.$nextTick(()=>{})2.3 3.3虚拟dom描述(createElement函数)1.标签名tag2。属性attrs/propertys3。子节点children` {tag:"p"",propertys:{id:"best"}children[{tag:"a",children:["content"]},{tag:"span",children:["inline"]}]}`*1*2*3*4*5*6*7*8*9*10*11*123.4renderwebpackvue-template-compiler将template转为render函数createElement(创建虚拟dom节点)标签name属性子节点,value直接支持jsx语法功能:动态创建组件,生成模板` 你好1渲染函数
