Skip to content

Commit 9d01514

Browse files
committed
fix($core): cannot render another page with pageKey (close: #1173)
Error: Unknown Custom Element - <v-#####>
1 parent e5f51de commit 9d01514

File tree

1 file changed

+3
-1
lines changed
  • packages/@vuepress/core/lib/client/components

1 file changed

+3
-1
lines changed

packages/@vuepress/core/lib/client/components/Content.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { isPageExists } from '../util'
1+
import Vue from 'vue'
2+
import { isPageExists, getPageAsyncComponent } from '../util'
23

34
export default {
45
props: {
@@ -11,6 +12,7 @@ export default {
1112
render (h) {
1213
const pageKey = this.pageKey || this.$parent.$page.key
1314
if (isPageExists(pageKey)) {
15+
Vue.component(pageKey, getPageAsyncComponent(pageKey))
1416
return h(pageKey)
1517
}
1618
return h('')

0 commit comments

Comments
 (0)