Skip to content

Instantly share code, notes, and snippets.

View hasan-almujtaba's full-sized avatar

Hasan Al Mujtaba hasan-almujtaba

View GitHub Profile
<template>
<v-row>
<v-col v-for="(item, i) in items" :key="i" cols="12" lg="4">
<v-card>
<v-card-title v-text="item.name"></v-card-title>
</v-card>
</v-col>
</v-row>
</template>
<template>
<v-row>
<v-col v-for="(item, i) in items" :key="i" cols="12" lg="4">
<v-card>
<v-card-title v-text="item.name"></v-card-title>
</v-card>
</v-col>
</v-row>
</template>
<script>
export default {
async asyncData({ $axios }) {
const { data } = await $axios.get('/users')
return {
items: data,
}
},
}
</script>
export default function ({ $axios }) {
// set base url ke jsonplaceholder
$axios.setBaseURL('https://jsonplaceholder.typicode.com')
}
<template>
<v-row> </v-row>
</template>
<script>
export default {}
</script>