-
-
Save uno-de-piera/80aa0c651716c344db62c19ace1c1571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<b-container> | |
<render-less-list-todos v-model="todos"> | |
<div slot-scope="{ todos, removeTodo, inputAttributes, inputEvents }"> | |
<b-list-group> | |
<b-list-group-item v-for="todo in todos"> | |
{{ todo }} <b-btn variant="danger" class="float-right" @click="removeTodo(todo)">Eliminar</b-btn> | |
</b-list-group-item> | |
</b-list-group> | |
<b-form-input | |
placeholder="Añade una nueva tarea" | |
@input.native="inputEvents.input" | |
@keydown.native="inputEvents.keydown" | |
v-bind="inputAttributes" | |
></b-form-input> | |
</div> | |
</render-less-list-todos> | |
</b-container> | |
</template> | |
<script> | |
import RenderLessListTodos from '@/components/RenderLessListTodos.vue' | |
export default { | |
components: { | |
RenderLessListTodos | |
}, | |
data () { | |
return { | |
todos: ['todo 1'] | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment