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 @@ ...@@ -29,7 +29,7 @@
"@nuxtjs/meta": "latest", "@nuxtjs/meta": "latest",
"@nuxtjs/workbox": "latest", "@nuxtjs/workbox": "latest",
"firebase": "^4.1.1", "firebase": "^4.1.1",
"nuxt": "^1.0.0-alpha.3", "nuxt": "1.0.0-alpha.3",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^3.0.1" "stylus-loader": "^3.0.1"
} }
......
...@@ -19,17 +19,19 @@ ...@@ -19,17 +19,19 @@
</template> </template>
<script> <script>
import {watchList} from '../../api' import { watchList } from '../../api'
import Item from '../../components/Item.vue' import Item from '../../components/Item.vue'
const camelize = str => str.charAt(0).toUpperCase() + str.slice(1) const camelize = str => str.charAt(0).toUpperCase() + str.slice(1)
export default { export default {
name: 'item-list', name: 'item-list',
components: { components: {
Item Item
}, },
validate({ params }) {
return ['top', 'new', 'show', 'ask', 'job'].includes(params.type)
},
data() { data() {
return { return {
transition: 'slide-right', transition: 'slide-right',
...@@ -41,9 +43,6 @@ ...@@ -41,9 +43,6 @@
fetch({store, params}) { fetch({store, params}) {
return store.dispatch('FETCH_LIST_DATA', {type: params.type}) return store.dispatch('FETCH_LIST_DATA', {type: params.type})
}, },
meta: {
},
computed: { computed: {
page() { page() {
return Number(this.$route.params.page) || 1 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