02 2021 档案
摘要:示例: <template> <div id="app"> <div ref="msg">{{ name }}</div> <button @click="change">change</button> <button @click="changeLast">changeLast</button>
阅读全文
摘要:例子 <template> <div id="app"> <!-- <hello-world />--> <div ref="msg">{{ msg }}</div> <button @click="change">change</button> </div> </template> <script
阅读全文
摘要:场景: new Vue({ el: '#app', render: h => h(App) }) 初始化渲染时在根实例的mountComponent方法中new Watcher() 在实例化watcher的过程中会调用updateComponent回调方法,这是会调用render函数,在执行rend
阅读全文
摘要:Vue.component('HelloWorld', function(resolve, reject) { require(['./components/HelloWorld'], function(res) { resolve(res); }) }) 对于这个异步组件例子都完整加载流程 先执行
阅读全文
摘要:new Vue发生了什么 此处只针对最简单基础的new Vue过程,一般项目中采用.vue单文件组件的形式开发,下面会介绍 对于 runtime+compile 版本: 初始化一个 vue 实例的一系列相关环境(watcher,lifecycle, methods等等), compile:将 tem
阅读全文
浙公网安备 33010602011771号