Skip to content

Commit c45e8a7

Browse files
giraud florentgiraud florent
giraud florent
authored and
giraud florent
committed
fix(layout): try to locate the error exactly #1807
1 parent a81ef8a commit c45e8a7

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

Diff for: packages/@vuepress/core/lib/client/components/GlobalLayout.vue

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
<template>
2-
<component :is="layout"/>
2+
<div v-if="false">
3+
<component :is="layout" />
4+
</div>
35
</template>
46

57
<script>
6-
import Vue from 'vue'
7-
import { setGlobalInfo } from '@app/util'
8+
// import Vue from 'vue'
9+
// import { setGlobalInfo } from '@app/util'
810
911
export default {
1012
methods: {
1113
getLayout () {
1214
if (this.$page.path) {
1315
const layout = this.$page.frontmatter.layout
14-
if (layout && (this.$vuepress.getLayoutAsyncComponent(layout)
15-
|| this.$vuepress.getVueComponent(layout))) {
16+
if (
17+
layout
18+
&& (this.$vuepress.getLayoutAsyncComponent(layout)
19+
|| this.$vuepress.getVueComponent(layout))
20+
) {
1621
return layout
1722
}
1823
return 'Layout'
@@ -23,9 +28,10 @@ export default {
2328
2429
computed: {
2530
layout () {
26-
const layout = this.getLayout()
27-
setGlobalInfo('layout', layout)
28-
return Vue.component(layout)
31+
return false
32+
// const layout = this.getLayout()
33+
// setGlobalInfo('layout', layout)
34+
// return Vue.component(layout)
2935
}
3036
}
3137
}

0 commit comments

Comments
 (0)