ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ***** ## web-runtim web运行时 >[info] import ~~~ ;(导入)运行时基础 import Vue from 'core/index' import { createPatchFunction } from 'core/vdom/patch' import * as nodeOps from 'web/runtime/node-ops' import platformDirectives from 'web/runtime/directives/index' import baseModules from 'core/vdom/modules/index' import platformModules from 'web/runtime/modules/index' import { query, isUnknownElement, isReservedTag } from 'web/util/index' import { inBrowser } from 'core/util/env' ~~~ >[info] module ~~~ ;核心配置扩展 Vue.config.isUnknownElement = isUnknownElement Vue.config.isReservedTag = isReservedTag ;核心选项扩展 Vue.options.directives = platformDirectives ;创建patch函数 const modules = baseModules.concat(platformModules) Vue.prototype.__patch__ = inBrowser ? createPatchFunction({ nodeOps, modules }) : function noop () {} ;Vue.$mount修正 Vue.prototype.$mount = function (el) { this.$el = el && query(el) this._mount() } ;导出运行时Vue export default Vue ~~~ >[info] export ~~~ ;(导出)运行时Vue export default Vue ~~~