Vue的运行机制

1. 初始化 在 new Vue() 之后。 Vue 会调用 _init 函数进行初始化 初始化过程: ①初始化生命周期、事件、 props、 methods、 data、 computed 与 watch 等 ②通过 Object.defineProperty 设置 setter 与 getter 函数,用来实现「响应式」以及「依赖收集」 2.挂载组件 调用$mount挂载组件 3.编译 *(如
相关文章
相关标签/搜索