File tree Expand file tree Collapse file tree 4 files changed +11
-21
lines changed
packages/@vuepress/plugin-i18n-ui Expand file tree Collapse file tree 4 files changed +11
-21
lines changed Original file line number Diff line number Diff line change 1
1
import Layout from './index.vue'
2
+ // TODO move default theme styl to core.
3
+ import '@theme/styles/theme.styl'
2
4
3
5
export default ( { Vue } ) => {
4
- Vue . component ( 'I18nUI ' , Layout )
6
+ Vue . component ( 'I18nUILayout ' , Layout )
5
7
}
Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ module.exports = (pluginOptions = {}, context) => ({
12
12
13
13
additionalPages : [
14
14
{
15
- filePath : path . resolve ( __dirname , 'index.md' ) ,
16
- permalink : pluginOptions . permalink || '/i18n/'
15
+ permalink : pluginOptions . permalink || '/i18n/' ,
16
+ frontmatter : {
17
+ 'layout' : 'I18nUILayout'
18
+ }
17
19
}
18
20
]
19
21
} )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div id =" vuepress-plugin-i18n-ui" >
3
-
2
+ <div class =" theme-container" id =" vuepress-plugin-i18n-ui" >
4
3
<div class =" tool-box" >
5
4
<span class =" select-lang" >Language:  ; </span >
6
5
<select >
17
16
<div class =" helper-content" >
18
17
<div id =" left" >
19
18
<transition name =" slide-left" >
20
- <Content
21
- v-if =" currentPageComponent"
22
- :page-key =" key"
23
- />
19
+ <Content :page-key =" key" />
24
20
</transition >
25
21
</div >
26
22
<div id =" right" >
27
23
<transition name =" slide-left" >
28
- <Content
29
- v-if =" rightPageComponent"
30
- :page-key =" rightKey"
31
- />
24
+ <Content :page-key =" rightKey" />
32
25
</transition >
33
26
</div >
34
27
</div >
@@ -41,16 +34,12 @@ import { findPageForPath } from '@app/util'
41
34
export default {
42
35
data () {
43
36
return {
44
- currentPagePath: ' /' ,
45
- currentPageComponent: null ,
46
- rightPageComponent: null
37
+ currentPagePath: ' /'
47
38
}
48
39
},
49
40
50
41
mounted () {
51
42
syncScroll ()
52
- this .loadComponent (this .key , ' currentPageComponent' )
53
- this .loadComponent (this .rightKey , ' rightPageComponent' )
54
43
},
55
44
56
45
computed: {
You can’t perform that action at this time.
0 commit comments