Guest User

Untitled

a guest
Feb 25th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <template>
  2. <task-list>
  3. <task>Task 1</task>
  4. <task>Task 2</task>
  5. </task-list>
  6. </template>
  7. <script>
  8. import TaskList from './tasklist.vue'
  9. export default {
  10. //...
  11. components: {
  12. TaskList
  13. }
  14. //...
  15. }
  16. </script>
  17.  
  18. <template>
  19. <ul>
  20. <slot></slot>
  21. </ul>
  22. </template>
  23. <script>
  24. import Task from './task.vue'
  25. export default {
  26. //...
  27. name: 'task-list'
  28. components: {
  29. Task
  30. }
  31. //...
  32. }
  33. </script>
  34.  
  35. <template>
  36. <li><slot></slot></li>
  37. </template>
  38. <script>
  39. export default {
  40. name: 'task',
  41. //...
  42. }
  43. </script>
  44.  
  45. import App from './App.vue'
  46.  
  47. new Vue({
  48. el: '#app',
  49. render: h => h(App)
  50. })
Add Comment
Please, Sign In to add comment