|
@@ -24,7 +24,9 @@ export default function (Vue) {
|
|
const options = this.$options
|
|
const options = this.$options
|
|
// store injection
|
|
// store injection
|
|
if (options.store) {
|
|
if (options.store) {
|
|
- this.$store = options.store
|
|
|
|
|
|
+ this.$store = typeof options.store === 'function'
|
|
|
|
+ ? options.store()
|
|
|
|
+ : options.store
|
|
} else if (options.parent && options.parent.$store) {
|
|
} else if (options.parent && options.parent.$store) {
|
|
this.$store = options.parent.$store
|
|
this.$store = options.parent.$store
|
|
}
|
|
}
|