|
@@ -223,6 +223,16 @@ export { createLogger }
|
|
|
// export install function
|
|
|
export function install (_Vue) {
|
|
|
Vue = _Vue
|
|
|
+ const _init = Vue.prototype._init
|
|
|
+ Vue.prototype._init = function (options) {
|
|
|
+ options = options || {}
|
|
|
+ if (options.store) {
|
|
|
+ this.$store = options.store
|
|
|
+ } else if (options.parent && options.parent.$store) {
|
|
|
+ this.$store = options.parent.$store
|
|
|
+ }
|
|
|
+ _init.call(this, options)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// also export the default
|