Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <template>
  2. <div class="todo-list">
  3. <todo-item v-for="(todo, index) in todos"
  4. :key="index"
  5. :title="todo.title"
  6. :descr="todo.description" />
  7. </div>
  8. </template>
  9.  
  10. <script>
  11. import TodoItem from '@/components/TodoItem'
  12. export default {
  13. props: {
  14. todos: {
  15. type: Array,
  16. required: true
  17. }
  18. },
  19. components: {
  20. TodoItem
  21. },
  22. data() {
  23. return {
  24. todoTitle: 'Bring Chocolate',
  25. todoDescr: 'Only Cadbury Silk'
  26. }
  27. }
  28.  
  29. }
  30. </script>
  31. <style scoped>
  32. .todo-list {
  33. flex: 1;
  34. }
  35. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement