We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d01514 commit 0306574Copy full SHA for 0306574
packages/@vuepress/core/lib/client/components/GlobalLayout.vue
@@ -3,11 +3,16 @@
3
</template>
4
5
<script>
6
+import Vue from 'vue'
7
+
8
export default {
9
computed: {
10
layout () {
11
if (this.$page.path) {
- if (this.$vuepress.isLayoutExists(this.$page.frontmatter.layout)) {
12
+ if (
13
+ this.$vuepress.isLayoutExists(this.$page.frontmatter.layout)
14
+ || Boolean(Vue.component(this.$page.frontmatter.layout))
15
+ ) {
16
return this.$page.frontmatter.layout
17
}
18
return 'Layout'
0 commit comments