2.5.0 • Published 6 years ago

@whale-you/vue-core v2.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

vue-core

Vue platform-independent core code, build from js/src/core. Easy to use vue's responsive features.

Usage

installation

npm i vue-core --save

bind __patch__ and $mount

// runtime.js
import Vue from 'vue-core'

Vue.prototype.$mount = function () {
  // do some thing before mount
  // and then mount vue
  Vue.prototype._mountComponent(this)
}
Vue.prototype.__patch__ = function (prevVnode, vnode) {
  // update view as you want when data changed
}

and then use vue as normal

import Vue from 'runtime.js'

const app = new Vue(vueOptions)
app.$mount()