Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 42118a3

Browse files
committed
fix: Vue is undefined
1 parent ce68dc2 commit 42118a3

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

global-components/BaseListLayout.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@
55
<div class="ui-post-title">
66
<NavLink :link="page.path">{{ page.title }}</NavLink>
77
</div>
8+
89
<div class="ui-post-summary">
910
{{ page.frontmatter.summary || page.summary }}
1011
<!-- <Content :page-key="page.key" slot-key="intro"/>-->
1112
</div>
13+
1214
<div class="ui-post-author" v-if="page.frontmatter.author">
1315
<NavigationIcon/>
1416
<span>{{ page.frontmatter.author }} in {{ page.frontmatter.location }}</span>
1517
</div>
18+
1619
<div class="ui-post-date" v-if="page.frontmatter.date">
1720
<ClockIcon/>
1821
<span>{{ new Date(page.frontmatter.date.trim()).toDateString() }}</span>
1922
</div>
2023
</div>
2124
</div>
22-
25+
2326
<component v-if="$pagination.length > 1 && paginationComponent" :is="paginationComponent"></component>
2427
</div>
2528
</template>
2629

2730
<script>
2831
/* global THEME_BLOG_PAGINATION_COMPONENT */
2932
30-
import Toc from '@theme/components/Toc.vue'
33+
import Vue from 'vue'
3134
import { NavigationIcon, ClockIcon } from 'vue-feather-icons'
3235
import { Pagination, SimplePagination } from '@vuepress/plugin-blog/lib/client/components'
33-
36+
3437
export default {
35-
components: { Toc, Pagination, NavigationIcon, ClockIcon },
36-
// props: ['pagination'],
38+
components: { NavigationIcon, ClockIcon },
39+
3740
data() {
3841
return {
3942
paginationComponent: null
@@ -46,7 +49,6 @@
4649
4750
computed: {
4851
pages() {
49-
console.log(this.$pagination)
5052
return this.$pagination.pages
5153
},
5254
},
@@ -57,9 +59,11 @@
5759
if (n === 'Pagination') {
5860
return Pagination
5961
}
62+
6063
if (n === 'SimplePagination') {
6164
return SimplePagination
6265
}
66+
6367
return Vue.component(n) || Pagination
6468
}
6569
}
@@ -75,10 +79,11 @@
7579
padding-bottom 25px
7680
margin-bottom 25px
7781
border-bottom 1px solid #f1f1f1
82+
7883
&:last-child
7984
border-bottom 0px
8085
margin-bottom 0px
81-
86+
8287
p
8388
margin 0
8489
@@ -122,12 +127,11 @@
122127
font-size 12px
123128
color rgba(0, 0, 0, 0.54)
124129
font-weight 200
125-
130+
126131
svg
127132
margin-right 5px
128133
width 14px
129134
height 14px
130-
131135
</style>
132136

133137
<style src="prismjs/themes/prism-okaidia.css"></style>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"author": "ulivz<[email protected]>",
2828
"license": "MIT",
2929
"dependencies": {
30-
"@vuepress/plugin-blog": "1.2.1",
30+
"@vuepress/plugin-blog": "1.2.2",
3131
"@vuepress/plugin-medium-zoom": "1.0.0",
3232
"@vuepress/plugin-nprogress": "1.0.0",
3333
"@vuepress/plugin-pwa": "1.0.0",

0 commit comments

Comments
 (0)