From 8b23ee68766c5e1bdf1a28dda7df647b71cd5686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=AD=E7=88=B1vue=E7=9A=84=E5=B0=8F=E8=8F=9C=E9=B8=9F?= <282126990@qq.com> Date: Tue, 29 Nov 2022 19:34:18 +0800 Subject: [PATCH] fix: "hook:mounted": "TypeError: Cannot create property 'initializing' on boolean 'true'" $root[rootConfigKey] is not an object when mounted with uni-app, because uni-app onLoad life cycle priority is higher --- src/shared/mixin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/mixin.js b/src/shared/mixin.js index e39aac51..3a81967e 100644 --- a/src/shared/mixin.js +++ b/src/shared/mixin.js @@ -21,6 +21,8 @@ export default function createMixin (Vue, options) { const $root = this[rootKey] const $options = this.$options const devtoolsEnabled = Vue.config.devtools + + $root[rootConfigKey] = {} Object.defineProperty(this, '_hasMetaInfo', { configurable: true,