Evan You 9 years ago
parent
commit
e1fd82573b
  1. 4
      src/entries/web-runtime.js
  2. 4
      src/runtime/dom-backend/index.js
  3. 0
      src/runtime/dom-backend/modules/attrs.js
  4. 0
      src/runtime/dom-backend/modules/class.js
  5. 0
      src/runtime/dom-backend/modules/directives.js
  6. 0
      src/runtime/dom-backend/modules/events.js
  7. 0
      src/runtime/dom-backend/modules/pre.js
  8. 0
      src/runtime/dom-backend/modules/props.js
  9. 0
      src/runtime/dom-backend/modules/style.js
  10. 0
      src/runtime/dom-backend/node-ops.js
  11. 6
      src/runtime/instance/lifecycle.js
  12. 2
      src/runtime/vdom/patch.js

4
src/entries/web-runtime.js

@ -1,6 +1,6 @@
import Vue from '../runtime/index'
import { update } from '../runtime/dom-updater/index'
import { patch } from '../runtime/dom-backend/index'
Vue.prototype.__update__ = update
Vue.prototype.__patch__ = patch
export default Vue

4
src/runtime/dom-updater/index.js → src/runtime/dom-backend/index.js

@ -1,4 +1,4 @@
import createUpdater from '../vdom/create-updater'
import createPatchFunction from '../vdom/patch'
import * as nodeOps from './node-ops'
import classes from './modules/class'
import style from './modules/style'
@ -7,7 +7,7 @@ import attrs from './modules/attrs'
import events from './modules/events'
import directives from './modules/directives'
export const update = createUpdater({
export const patch = createPatchFunction({
nodeOps,
modules: [
classes,

0
src/runtime/dom-updater/modules/attrs.js → src/runtime/dom-backend/modules/attrs.js

0
src/runtime/dom-updater/modules/class.js → src/runtime/dom-backend/modules/class.js

0
src/runtime/dom-updater/modules/directives.js → src/runtime/dom-backend/modules/directives.js

0
src/runtime/dom-updater/modules/events.js → src/runtime/dom-backend/modules/events.js

0
src/runtime/dom-updater/modules/pre.js → src/runtime/dom-backend/modules/pre.js

0
src/runtime/dom-updater/modules/props.js → src/runtime/dom-backend/modules/props.js

0
src/runtime/dom-updater/modules/style.js → src/runtime/dom-backend/modules/style.js

0
src/runtime/dom-updater/node-ops.js → src/runtime/dom-backend/node-ops.js

6
src/runtime/instance/lifecycle.js

@ -58,11 +58,11 @@ export function lifecycleMixin (Vue) {
callHook(this, 'beforeUpdate')
}
if (!this._vnode) {
// Vue.prototype.__update__ is injected in entry points
// Vue.prototype.__patch__ is injected in entry points
// based on the rendering backend used.
this.$el = this.__update__(this.$el, vnode)
this.$el = this.__patch__(this.$el, vnode)
} else {
this.$el = this.__update__(this._vnode, vnode)
this.$el = this.__patch__(this._vnode, vnode)
}
this._vnode = vnode
if (this._mounted) {

2
src/runtime/vdom/create-updater.js → src/runtime/vdom/patch.js

@ -36,7 +36,7 @@ function createKeyToOldIdx (children, beginIdx, endIdx) {
return map
}
export default function createUpdater (backend) {
export default function createPatchFunction (backend) {
let i, j
const cbs = {}
Loading…
Cancel
Save