From a2386e5a59e17775e2077d4e3dce7f389deda909 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Thu, 15 Oct 2020 23:25:02 -0500 Subject: [PATCH] Add vueComponents support --- src/core/render/index.js | 116 ++++++++++++++++------- test/e2e/vue.test.js | 193 ++++++++++++++++++++++----------------- 2 files changed, 189 insertions(+), 120 deletions(-) diff --git a/src/core/render/index.js b/src/core/render/index.js index bedd8bb0..f5de5915 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -66,15 +66,6 @@ function renderMain(html) { .findAll('.markdown-section > *') .filter(elm => isMountedVue(elm)); - // Store global data() return value as shared data object - if ( - !vueGlobalData && - docsifyConfig.vueGlobalOptions && - typeof docsifyConfig.vueGlobalOptions.data === 'function' - ) { - vueGlobalData = docsifyConfig.vueGlobalOptions.data(); - } - // Destroy/unmount existing Vue instances for (const mountedElm of mountedElms) { if (vueVersion === 2) { @@ -101,6 +92,27 @@ function renderMain(html) { // Handle Vue content not mounted by markdown