Nuxt/test/fixtures/basic/pages/validate-async.vue

16 lines
234 B
Vue
Raw Normal View History

2018-08-25 09:42:00 +00:00
<template>
<h1>I am valid</h1>
</template>
<script>
export default {
validate({ query }) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(Boolean(query.valid))
}, 500)
})
}
}
</script>