File tree Expand file tree Collapse file tree 7 files changed +52
-3
lines changed
Expand file tree Collapse file tree 7 files changed +52
-3
lines changed Original file line number Diff line number Diff line change 4949 </div >
5050 <div class =" info-wrapper" >
5151 <PersonalInfo />
52- <h4 ><i class =" iconfont reco-category" ></i > 分类 </h4 >
52+ <h4 ><i class =" iconfont reco-category" ></i > {{homeBlogCfg.category}} </h4 >
5353 <ul class =" category-wrapper" >
5454 <li class =" category-item" v-for =" (item, index) in this.$categories.list" :key =" index" >
5555 <router-link :to =" item.path" >
5959 </li >
6060 </ul >
6161 <hr >
62- <h4 v-if =" $tags.list.length !== 0" ><i class =" iconfont reco-tag" ></i > 标签 </h4 >
62+ <h4 v-if =" $tags.list.length !== 0" ><i class =" iconfont reco-tag" ></i > {{homeBlogCfg.tag}} </h4 >
6363 <TagList @getCurrentTag =" getPagesByTags" />
64- <h4 v-if =" $themeConfig.friendLink && $themeConfig.friendLink.length !== 0" ><i class =" iconfont reco-friend" ></i > 友链 </h4 >
64+ <h4 v-if =" $themeConfig.friendLink && $themeConfig.friendLink.length !== 0" ><i class =" iconfont reco-friend" ></i > {{homeBlogCfg.friendLink}} </h4 >
6565 <FriendLink />
6666 </div >
6767 </div >
@@ -94,6 +94,9 @@ export default {
9494 }
9595 },
9696 computed: {
97+ homeBlogCfg () {
98+ return this .$recoLocals .homeBlog
99+ },
97100 actionLink () {
98101 const {
99102 actionLink: link ,
@@ -130,6 +133,7 @@ export default {
130133 mounted () {
131134 this .recoShow = true
132135 this ._setPage (this ._getStoragePage ())
136+ console .log (this )
133137 },
134138 methods: {
135139 // 获取当前页码
Original file line number Diff line number Diff line change 11import postMixin from '@theme/mixins/posts'
2+ import localMixin from '@theme/mixins/locals'
23
34export default ( {
45 Vue
56} ) => {
67 Vue . mixin ( postMixin )
8+ Vue . mixin ( localMixin )
79}
Original file line number Diff line number Diff line change 1+ export default {
2+ homeBlog : {
3+ article : 'article' ,
4+ tag : 'tag' ,
5+ category : 'category' ,
6+ friendLink : 'friend link'
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ import zhHans from './zh-hans.js'
2+ import zhHant from './zh-hant.js'
3+ import en from './en.js'
4+ export { zhHans , zhHant , en }
Original file line number Diff line number Diff line change 1+ export default {
2+ homeBlog : {
3+ article : '文章' ,
4+ tag : '标签' ,
5+ category : '分类' ,
6+ friendLink : '友情链接'
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ export default {
2+ homeBlog : {
3+ article : '文章' ,
4+ tag : '標簽' ,
5+ category : '分類' ,
6+ friendLink : '友情鏈接'
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ import { zhHans , zhHant , en } from '../locals/index'
2+
3+ export default {
4+ computed : {
5+ $recoLocals ( ) {
6+ if ( / ^ z h \- ( C N | S G ) $ / . test ( this . $lang ) ) {
7+ return zhHans
8+ }
9+ if ( / ^ z h \- ( H K | M O | T W ) $ / . test ( this . $lang ) ) {
10+ return zhHant
11+ }
12+ return en
13+ }
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments