<script>
export default {
data: () => ({
users: null,
posts: null
}),
mounted() {
axios.all([
axios.get('/api/users'),
axios.get('/api/posts')
]).then(axios.spread(([
users,
posts
]) => {
console.log(users.data, posts.data),
this.users = users.data,
this.posts = posts.data
///
}));
}
}
</script>
Благодарю за помощь!