01 2021 档案
摘要:templet = { type:"div", attr:{ id:"div2"}, classList:["2"], children:[ { type:"span", attr:{ id:"text1", value:"is text"}, classList:["1"], id:"span1"
阅读全文
摘要:1.static getDerivedStateFromProps(nextProps,prevState){ return {number:prevState.number*2} } 返回的是一个新的state 2.getSnapshotBeforeUpdate(){ return this.co
阅读全文
摘要:function render(element,container){ console.log(element) if(typeof element 'string' || typeof element 'number'){ return container.appendChild(document
阅读全文
摘要:vue.use(VueRouter) 咱们经常看到vue上面会通过use调用一些方法,那么这些方法到底执行了什么呢? 其实每个第三方插件都是一个具有install 方法的类,在vue.use(VueRouter)的那一刻,会执行VueRouter里面的install方法。如果没有install方法会
阅读全文