Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
计算机应用开发
前端
Vuepress
提交
7bfb8a66
V
Vuepress
项目概览
计算机应用开发
/
前端
/
Vuepress
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vuepress
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7bfb8a66
编写于
4月 26, 2018
作者:
花
花裤衩
提交者:
Evan You
4月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: lint code (#264)
上级
d454b1cf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
15 deletion
+12
-15
lib/default-theme/DropdownLink.vue
lib/default-theme/DropdownLink.vue
+2
-3
lib/default-theme/Layout.vue
lib/default-theme/Layout.vue
+2
-4
lib/default-theme/NavLink.vue
lib/default-theme/NavLink.vue
+1
-1
lib/default-theme/NavLinks.vue
lib/default-theme/NavLinks.vue
+4
-4
lib/default-theme/Sidebar.vue
lib/default-theme/Sidebar.vue
+2
-2
lib/default-theme/SidebarLink.vue
lib/default-theme/SidebarLink.vue
+1
-1
未找到文件。
lib/default-theme/DropdownLink.vue
浏览文件 @
7bfb8a66
...
@@ -27,13 +27,12 @@
...
@@ -27,13 +27,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
isExternal
,
ensureExt
}
from
'
./util
'
import
NavLink
from
'
./NavLink.vue
'
import
NavLink
from
'
./NavLink.vue
'
import
DropdownTransition
from
'
./DropdownTransition.vue
'
import
DropdownTransition
from
'
./DropdownTransition.vue
'
export
default
{
export
default
{
components
:
{
NavLink
,
DropdownTransition
},
components
:
{
NavLink
,
DropdownTransition
},
data
()
{
data
()
{
return
{
return
{
open
:
false
open
:
false
}
}
...
@@ -44,7 +43,7 @@ export default {
...
@@ -44,7 +43,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
toggle
()
{
toggle
()
{
this
.
open
=
!
this
.
open
this
.
open
=
!
this
.
open
}
}
}
}
...
...
lib/default-theme/Layout.vue
浏览文件 @
7bfb8a66
...
@@ -56,7 +56,6 @@ export default {
...
@@ -56,7 +56,6 @@ export default {
)
)
},
},
shouldShowSidebar
()
{
shouldShowSidebar
()
{
const
{
themeConfig
}
=
this
.
$site
const
{
frontmatter
}
=
this
.
$page
const
{
frontmatter
}
=
this
.
$page
return
(
return
(
!
frontmatter
.
layout
&&
!
frontmatter
.
layout
&&
...
@@ -73,13 +72,13 @@ export default {
...
@@ -73,13 +72,13 @@ export default {
this
.
$localePath
this
.
$localePath
)
)
},
},
pageClasses
()
{
pageClasses
()
{
const
userPageClass
=
this
.
$page
.
frontmatter
.
pageClass
const
userPageClass
=
this
.
$page
.
frontmatter
.
pageClass
return
[
return
[
{
{
'
no-navbar
'
:
!
this
.
shouldShowNavbar
,
'
no-navbar
'
:
!
this
.
shouldShowNavbar
,
'
sidebar-open
'
:
this
.
isSidebarOpen
,
'
sidebar-open
'
:
this
.
isSidebarOpen
,
'
no-sidebar
'
:
!
this
.
shouldShowSidebar
,
'
no-sidebar
'
:
!
this
.
shouldShowSidebar
},
},
userPageClass
userPageClass
]
]
...
@@ -92,7 +91,6 @@ export default {
...
@@ -92,7 +91,6 @@ export default {
this
.
$ssrContext
.
lang
=
this
.
$lang
this
.
$ssrContext
.
lang
=
this
.
$lang
this
.
$ssrContext
.
description
=
this
.
$page
.
description
||
this
.
$description
this
.
$ssrContext
.
description
=
this
.
$page
.
description
||
this
.
$description
}
}
},
},
mounted
()
{
mounted
()
{
...
...
lib/default-theme/NavLink.vue
浏览文件 @
7bfb8a66
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
link
()
{
link
()
{
return
ensureExt
(
this
.
item
.
link
)
return
ensureExt
(
this
.
item
.
link
)
}
}
},
},
...
...
lib/default-theme/NavLinks.vue
浏览文件 @
7bfb8a66
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
nav
()
{
nav
()
{
const
{
locales
}
=
this
.
$site
const
{
locales
}
=
this
.
$site
if
(
locales
&&
Object
.
keys
(
locales
).
length
>
1
)
{
if
(
locales
&&
Object
.
keys
(
locales
).
length
>
1
)
{
le
t
currentLink
=
this
.
$page
.
path
cons
t
currentLink
=
this
.
$page
.
path
const
routes
=
this
.
$router
.
options
.
routes
const
routes
=
this
.
$router
.
options
.
routes
const
themeLocales
=
this
.
$site
.
themeConfig
.
locales
||
{}
const
themeLocales
=
this
.
$site
.
themeConfig
.
locales
||
{}
const
languageDropdown
=
{
const
languageDropdown
=
{
...
@@ -63,11 +63,11 @@ export default {
...
@@ -63,11 +63,11 @@ export default {
return
this
.
userNav
return
this
.
userNav
},
},
userLinks
()
{
userLinks
()
{
return
(
this
.
nav
||
[]).
map
(
(
link
=>
{
return
(
this
.
nav
||
[]).
map
(
link
=>
{
return
Object
.
assign
(
resolveNavLinkItem
(
link
),
{
return
Object
.
assign
(
resolveNavLinkItem
(
link
),
{
items
:
(
link
.
items
||
[]).
map
(
resolveNavLinkItem
)
items
:
(
link
.
items
||
[]).
map
(
resolveNavLinkItem
)
})
})
})
)
})
},
},
repoLink
()
{
repoLink
()
{
const
{
repo
}
=
this
.
$site
.
themeConfig
const
{
repo
}
=
this
.
$site
.
themeConfig
...
@@ -93,7 +93,7 @@ export default {
...
@@ -93,7 +93,7 @@ export default {
}
}
return
'
Source
'
return
'
Source
'
}
,
}
}
}
}
}
</
script
>
</
script
>
...
...
lib/default-theme/Sidebar.vue
浏览文件 @
7bfb8a66
...
@@ -19,9 +19,9 @@
...
@@ -19,9 +19,9 @@
<
script
>
<
script
>
import
SidebarGroup
from
'
./SidebarGroup.vue
'
import
SidebarGroup
from
'
./SidebarGroup.vue
'
import
SidebarLink
,
{
groupHeaders
}
from
'
./SidebarLink.vue
'
import
SidebarLink
from
'
./SidebarLink.vue
'
import
NavLinks
from
'
./NavLinks.vue
'
import
NavLinks
from
'
./NavLinks.vue
'
import
{
isActive
,
resolveSidebarItems
}
from
'
./util
'
import
{
isActive
}
from
'
./util
'
export
default
{
export
default
{
components
:
{
SidebarGroup
,
SidebarLink
,
NavLinks
},
components
:
{
SidebarGroup
,
SidebarLink
,
NavLinks
},
...
...
lib/default-theme/SidebarLink.vue
浏览文件 @
7bfb8a66
...
@@ -34,7 +34,7 @@ function renderLink (h, to, text, active) {
...
@@ -34,7 +34,7 @@ function renderLink (h, to, text, active) {
props
:
{
props
:
{
to
,
to
,
activeClass
:
''
,
activeClass
:
''
,
exactActiveClass
:
''
,
exactActiveClass
:
''
},
},
class
:
{
class
:
{
active
,
active
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录