Skip to content

Commit

Permalink
Kenny-NISLab#118 publicationsのドロップダウンを最新年度が自動で一番上に来るようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1119 committed Mar 2, 2022
1 parent cb5af48 commit 36601d3
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions components/common/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
import { mapMutations } from 'vuex'
export default {
data() {
return {
navItems: [
computed: {
navItems() {
return [
{
name: 'research',
children: [
Expand All @@ -62,29 +62,19 @@ export default {
{ name: 'education' },
{
name: 'publications',
children: [
{
name: '2021年度',
path: '2021',
},
{
name: '2020年度',
path: '2020',
},
{
name: '2019年度',
path: '2019',
},
{
name: '2018年度',
path: '2018',
},
],
children: this.$store.state.publications
.map((publication) => {
return {
name: publication.fields.slug + '年度',
path: publication.fields.slug,
}
})
.slice(0, 4),
},
{ name: 'members' },
{ name: 'contact' },
],
}
]
},
},
methods: {
...mapMutations(['close']),
Expand Down

0 comments on commit 36601d3

Please sign in to comment.