mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
25 lines
773 B
Vue
25 lines
773 B
Vue
<template>
|
|
<div class="container">
|
|
<h1>Dynamic route example</h1>
|
|
<h2>Project : {{ $route.params.slug }}</h2>
|
|
<p>
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
validate ({ params }) {
|
|
return /^[A-z]+$/.test(params.slug)
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
p
|
|
{
|
|
padding: 15px 30px;
|
|
}
|
|
</style>
|