From 5bd082ee334697edeb080bd5d361e9cb1972cd59 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Tue, 15 Feb 2022 17:03:18 +0800 Subject: [PATCH] wip(app): nvue lifecycle --- packages/uni-app-vue/dist/nvue.runtime.esm.dev.js | 8 +++++++- packages/uni-app-vue/dist/nvue.runtime.esm.prod.js | 8 +++++++- packages/uni-app-vue/lib/nvue.runtime.esm.js | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js b/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js index 77b6c1a7c..1112e933b 100644 --- a/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js +++ b/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js @@ -3602,7 +3602,13 @@ function applyOptions(instance) { if (components) instance.components = components; - if (directives) instance.directives = directives; + if (directives) instance.directives = directives; // fixed by xxxxxx + + var customApplyOptions = instance.appContext.config.globalProperties.$applyOptions; + + if (customApplyOptions) { + customApplyOptions(options, instance, publicThis); + } } function resolveInjections(injectOptions, ctx) { diff --git a/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js b/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js index 5d800178f..a1c22b5d8 100644 --- a/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js +++ b/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js @@ -2898,7 +2898,13 @@ function applyOptions(instance) { if (components) instance.components = components; - if (directives) instance.directives = directives; + if (directives) instance.directives = directives; // fixed by xxxxxx + + var customApplyOptions = instance.appContext.config.globalProperties.$applyOptions; + + if (customApplyOptions) { + customApplyOptions(options, instance, publicThis); + } } function resolveInjections(injectOptions, ctx) { diff --git a/packages/uni-app-vue/lib/nvue.runtime.esm.js b/packages/uni-app-vue/lib/nvue.runtime.esm.js index 19f8ea41d..ddc5ab48d 100644 --- a/packages/uni-app-vue/lib/nvue.runtime.esm.js +++ b/packages/uni-app-vue/lib/nvue.runtime.esm.js @@ -2915,6 +2915,12 @@ function applyOptions(instance) { instance.components = components; if (directives) instance.directives = directives; + // fixed by xxxxxx + const customApplyOptions = instance.appContext.config.globalProperties + .$applyOptions; + if (customApplyOptions) { + customApplyOptions(options, instance, publicThis); + } } function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { if (isArray(injectOptions)) { -- GitLab