Skip to content

Commit

Permalink
feat: comment & anchor use async component (solve blank while navigat…
Browse files Browse the repository at this point in the history
…ing)
  • Loading branch information
wxsms committed Oct 7, 2021
1 parent d04a727 commit 03382e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
</template>

<script>
import CommentBox from '@theme/components/CommentBox'
import Page from '@theme/layouts/Page'
import RightAnchor from '@theme/components/RightAnchor'
export default {
components: { Page, CommentBox, RightAnchor },
components: {
Page,
CommentBox: () => import('@theme/components/CommentBox'),
RightAnchor: () => import('@theme/components/RightAnchor'),
},
computed: {
showRightAnchor() {
return this.$page.headers && this.$page.headers.length > 0
Expand Down

0 comments on commit 03382e7

Please sign in to comment.