Skip to content

Commit 4a58744

Browse files
author
reco_luan
committed
fix: build error when use vssue
do not set data in function Vue.mixin()
1 parent e6ab863 commit 4a58744

File tree

12 files changed

+37
-16
lines changed

12 files changed

+37
-16
lines changed

components/Home.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
<script>
4545
import NavLink from '@theme/components/NavLink'
4646
import ModuleTransition from '@theme/components/ModuleTransition'
47+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
4748
4849
export default {
50+
mixins: [moduleTransitonMixin],
4951
components: { NavLink, ModuleTransition },
5052
computed: {
5153

components/HomeBlog.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ import NoteAbstract from '@theme/components/NoteAbstract'
9191
import pagination from '@theme/mixins/pagination'
9292
import ModuleTransition from '@theme/components/ModuleTransition'
9393
import { getOneColor } from '@theme/helpers/other'
94+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
9495
9596
export default {
96-
mixins: [pagination],
97+
mixins: [pagination, moduleTransitonMixin],
9798
components: { NoteAbstract, TagList, FriendLink, ModuleTransition },
9899
data () {
99100
return {

components/Page.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@
8383
import PageInfo from '@theme/components/PageInfo'
8484
import { resolvePage, outboundRE, endingSlashRE } from '@theme/helpers/utils'
8585
import ModuleTransition from '@theme/components/ModuleTransition'
86+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
8687
8788
export default {
89+
mixins: [moduleTransitonMixin],
8890
components: { PageInfo, ModuleTransition },
8991
9092
props: ['sidebarItems'],

components/Password.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242

4343
<script>
4444
import ModuleTransition from '@theme/components/ModuleTransition'
45+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
46+
4547
export default {
48+
mixins: [moduleTransitonMixin],
4649
components: { ModuleTransition },
4750
props: {
4851
isPage: {

enhanceApp.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import postMixin from '@theme/mixins/posts'
2-
import appMixin from '@theme/mixins/app'
32

43
export default ({
54
Vue
65
}) => {
76
Vue.mixin(postMixin)
8-
Vue.mixin(appMixin)
97
}

example/docs/.vuepress/config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ module.exports = {
6868
// appId: '...',// your appId
6969
// appKey: '...', // your appKey
7070
// }
71+
vssueConfig: {
72+
admins: ['recoluan'],
73+
platform: 'github',
74+
owner: 'vuepress-reco',
75+
repo: 'vuepress-reco.github.io',
76+
clientId: '4d81cea3b3d8aac8e88e',
77+
clientSecret: 'd23e8556b6d3c85abffbf4b8d853afb2ea08875a',
78+
},
7179
keyPage: {
7280
keys: ['123456']
7381
},

layouts/Category.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
:total="posts.length"
3737
:currentPage="currentPage"
3838
@getCurrentPage="getCurrentPage"></pagation>
39-
</ModuleTransition>
39+
</ModuleTransition>
4040
</Common>
4141
</div>
4242
</template>
@@ -48,9 +48,10 @@ import ModuleTransition from '@theme/components/ModuleTransition'
4848
import pagination from '@theme/mixins/pagination'
4949
import { sortPostsByStickyAndDate, filterPosts } from '@theme/helpers/postData'
5050
import { getOneColor } from '@theme/helpers/other'
51+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
5152
5253
export default {
53-
mixins: [pagination],
54+
mixins: [pagination, moduleTransitonMixin],
5455
components: { Common, NoteAbstract, ModuleTransition },
5556
5657
data () {

layouts/Tag.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
<ModuleTransition>
77
<TagList
88
v-if="recoShowModule"
9-
class="tags"
10-
:currentTag="$currentTags.key" @getCurrentTag="tagClick"></TagList>
9+
class="tags"
10+
:currentTag="$currentTags.key"
11+
@getCurrentTag="tagClick"></TagList>
1112
</ModuleTransition>
1213

1314
<!-- 博客列表 -->
@@ -40,9 +41,10 @@ import TagList from '@theme/components/TagList'
4041
import pagination from '@theme/mixins/pagination'
4142
import ModuleTransition from '@theme/components/ModuleTransition'
4243
import { sortPostsByStickyAndDate, filterPosts } from '@theme/helpers/postData'
44+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
4345
4446
export default {
45-
mixins: [pagination],
47+
mixins: [pagination, moduleTransitonMixin],
4648
components: { Common, NoteAbstract, TagList, ModuleTransition },
4749
4850
data () {

layouts/Tags.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<ModuleTransition>
66
<TagList
77
v-if="recoShowModule"
8-
:currentTag="currentTag"
8+
:currentTag="currentTag"
99
@getCurrentTag="tagClick"></TagList>
1010
</ModuleTransition>
1111

1212
<!-- 博客列表 -->
13-
<ModuleTransition delay="0.08">
13+
<ModuleTransition delay="0.08">
1414
<note-abstract
1515
v-if="recoShowModule"
1616
class="list"
@@ -39,9 +39,10 @@ import TagList from '@theme/components/TagList'
3939
import NoteAbstract from '@theme/components/NoteAbstract'
4040
import pagination from '@theme/mixins/pagination'
4141
import ModuleTransition from '@theme/components/ModuleTransition'
42+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
4243
4344
export default {
44-
mixins: [pagination],
45+
mixins: [pagination, moduleTransitonMixin],
4546
components: { Common, NoteAbstract, TagList, ModuleTransition },
4647
data () {
4748
return {

layouts/TimeLines.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
<ul class="timeline-wrapper">
55
<ModuleTransition >
66
<li v-if="recoShowModule" class="desc">Yesterday Once More!</li>
7-
</ModuleTransition>
8-
<ModuleTransition
7+
</ModuleTransition>
8+
<ModuleTransition
99
:delay="String(0.08 * (index + 1))"
10-
v-for="(item, index) in $recoPostsForTimeline" :key="index">
10+
v-for="(item, index) in $recoPostsForTimeline"
11+
:key="index">
1112
<li v-if="recoShowModule">
1213
<h3 class="year">{{item.year}}</h3>
1314
<ul class="year-wrapper">
@@ -17,7 +18,7 @@
1718
</li>
1819
</ul>
1920
</li>
20-
</ModuleTransition>
21+
</ModuleTransition>
2122
</ul>
2223
</Common>
2324
</div>
@@ -27,8 +28,10 @@
2728
<script>
2829
import Common from '@theme/components/Common'
2930
import ModuleTransition from '@theme/components/ModuleTransition'
31+
import moduleTransitonMixin from '@theme/mixins/moduleTransiton'
3032
3133
export default {
34+
mixins: [moduleTransitonMixin],
3235
name: 'TimeLine',
3336
components: { Common, ModuleTransition },
3437
filters: {

0 commit comments

Comments
 (0)