Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
年・月のクエリパラメータを取得可能にした
Browse files Browse the repository at this point in the history
  • Loading branch information
gouf committed Jan 18, 2021
1 parent fd5385a commit 7e45e7e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pages/admin/attendances.vue
@@ -0,0 +1,40 @@
<template>
<div>
<h1>Hello</h1>
<span>{{ this.$route.params }}</span>
<h2>{{ year }}年</h2>
<h2>{{ month }}月</h2>
</div>
</template>

<script>
export default {
mounted() {
this.$nextTick(() => {
// const params = this.$route.params
// console.log('Year:', params.year)
// console.log('Month:', params.month)
// TODO: Axios でのリクエストコードの追加
})
},
// methods: {
// year() {
// return this.$route.params.year
// },
// },
computed: {
year() {
return this.$route.params.year
},
month() {
return this.$route.params.month
},
},
}
</script>

<style scoped>
body {
background: #fefefe;
}
</style>
Empty file.
Empty file.

0 comments on commit 7e45e7e

Please sign in to comment.