From 70996f59405fa4ab1ebaeed309553e7d08bbdd1c Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 20 Jun 2019 18:37:32 +0800 Subject: [PATCH] fix(mp): add Global Mixin logic #411 --- src/core/runtime/wrapper/util.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index 1b82efcde..270e73fc3 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -1,3 +1,5 @@ +import Vue from 'vue' + import { isFn, noop, @@ -28,6 +30,10 @@ function hasHook (hook, vueOptions) { return true } + if (Vue.options && Array.isArray(Vue.options[hook])) { + return true + } + vueOptions = vueOptions.default || vueOptions if (isFn(vueOptions)) { -- GitLab