Commit 04f52fb2 authored by Sébastien Chopin's avatar Sébastien Chopin

use alpha 3 + add validate method to page

parent 8a82c2e6
......@@ -29,7 +29,7 @@
"@nuxtjs/meta": "latest",
"@nuxtjs/workbox": "latest",
"firebase": "^4.1.1",
"nuxt": "^1.0.0-alpha.3",
"nuxt": "1.0.0-alpha.3",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1"
}
......
......@@ -19,17 +19,19 @@
</template>
<script>
import {watchList} from '../../api'
import { watchList } from '../../api'
import Item from '../../components/Item.vue'
const camelize = str => str.charAt(0).toUpperCase() + str.slice(1)
export default {
name: 'item-list',
components: {
Item
},
validate({ params }) {
return ['top', 'new', 'show', 'ask', 'job'].includes(params.type)
},
data() {
return {
transition: 'slide-right',
......@@ -41,9 +43,6 @@
fetch({store, params}) {
return store.dispatch('FETCH_LIST_DATA', {type: params.type})
},
meta: {
},
computed: {
page() {
return Number(this.$route.params.page) || 1
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment