Vue实例$mount

// 在src/core/instance/init.js中 if (vm.$options.el) { vm.$mount(vm.$options.el) } 复制代码 重写原型上的$mount方法 纯前端浏览器环境compiler版本的$mount 如果el指向body或者html根节点则报错 判断当前实例有没有定义render函数,如果没有就去取template,通过compileToFunctions方法转换...