mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-18 14:41:25 +00:00
- Add example /custom-routes/ - Rename example/with-store/ to examples/vuex-store/ - Feature: Add .vue at the end of the component if not specified in custom routes - Feature: Add .params and .query in the context - Feature: Add .name in route if given in custom routes
21 lines
326 B
Vue
21 lines
326 B
Vue
<template>
|
|
<div class="user">
|
|
<h3>{{ name }}</h3>
|
|
<p>Email : {{ email }}</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import axios from 'axios'
|
|
|
|
export default {
|
|
data ({ params }) {
|
|
return axios.get(`http://jsonplaceholder.typicode.com/users/${params.id}`)
|
|
.then((res) => res.data)
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|