Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <task-list>
- <task>Task 1</task>
- <task>Task 2</task>
- </task-list>
- </template>
- <script>
- import TaskList from './tasklist.vue'
- export default {
- //...
- components: {
- TaskList
- }
- //...
- }
- </script>
- <template>
- <ul>
- <slot></slot>
- </ul>
- </template>
- <script>
- import Task from './task.vue'
- export default {
- //...
- name: 'task-list'
- components: {
- Task
- }
- //...
- }
- </script>
- <template>
- <li><slot></slot></li>
- </template>
- <script>
- export default {
- name: 'task',
- //...
- }
- </script>
- import App from './App.vue'
- new Vue({
- el: '#app',
- render: h => h(App)
- })
Add Comment
Please, Sign In to add comment