test: test for app.mixin & warnHandler

This commit is contained in:
Evan You
2019-09-05 20:59:45 -04:00
parent 891f21b010
commit 4c075803b5
2 changed files with 87 additions and 13 deletions

View File

@@ -146,15 +146,10 @@ export function applyOptions(
} = options
const globalMixins = instance.appContext.mixins
// beforeCreate
// applyOptions is called non-as-mixin once per instance
if (!asMixin) {
callSyncHook('beforeCreate', options, ctx, globalMixins)
}
// global mixins are applied first, and only if this is a non-mixin call
// so that they are applied once per instance.
if (!asMixin) {
// global mixins are applied first
applyMixins(instance, globalMixins)
}
// extending a base component...