diff --git a/src/mixin.js b/src/mixin.js index 8c6c14d39..3d5c5fb49 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -24,7 +24,9 @@ export default function (Vue) { const options = this.$options // store injection if (options.store) { - this.$store = options.store + this.$store = typeof options.store === 'function' + ? options.store() + : options.store } else if (options.parent && options.parent.$store) { this.$store = options.parent.$store }