Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div>
- <ul>
- <li v-for="item in a.data" :key="item" />
- </ul>
- </div>
- </template>
- <script>
- import newsRepository from '../api/newsRepository'
- export default {
- data: () => ({
- a: {}
- }),
- async asyncData() {
- if (process.server) {
- const a = await newsRepository.GetAllNews()
- console.log(a)
- return { a }
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement