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

Commit 696412d

Browse files
fix: support copyright without link (fix #105) (#111)
1 parent 140e33e commit 696412d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

components/Footer.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<div class="footer-right-wrap">
1919
<ul v-if="copyright" class="copyright">
2020
<li v-for="item in copyright" :key="item.text" class="copyright-item">
21-
<NavLink :link="item.link">{{ item.text }}</NavLink>
21+
<NavLink v-if="item.link" :link="item.link">{{ item.text }}</NavLink>
22+
<template v-else>{{ item.text }}</template>
2223
</li>
2324
</ul>
2425
</div>
@@ -180,13 +181,14 @@ ol, ul
180181
position relative
181182
line-height 12px
182183
border-right 1px solid $footerColor
184+
font-size 12px
185+
color $footerColor
183186
184187
&:last-child
185188
border-right none
186189
187190
a
188-
font-size 12px
189-
color $footerColor
191+
color currentColor
190192
text-decoration none
191193
transition color 0.3s
192194

docs/config/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ Welcome contribution of adding more built-in contact type.
101101

102102
### footer.copyright
103103

104+
- Type: `Array<{ text: string, link?: string }>`
105+
- Default: `undefined`
106+
104107
Copyright information, displayed on the right side of footer.
105108

106109
e.g.
@@ -115,7 +118,6 @@ module.exports = {
115118
},
116119
{
117120
text: 'MIT Licensed | Copyright © 2018-present Vue.js',
118-
link: '',
119121
},
120122
],
121123
},

example/.vuepress/config.js

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ module.exports = {
101101
},
102102
{
103103
text: 'MIT Licensed | Copyright © 2018-present Vue.js',
104-
link: '',
105104
},
106105
],
107106
},

0 commit comments

Comments
 (0)