Advertisement
Guest User

Untitled

a guest
Jun 13th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <script>
  2. import { mapGetters, mapActions } from "vuex";
  3.  
  4. export default {
  5. name: "Todos",
  6. computed: mapGetters(["todos"]),
  7. methods: {
  8. ...mapActions(["fetchTodos", 'removeTodo']),
  9. onDelete(id) {
  10. this.removeTodo(id);
  11. }
  12. },
  13. created() {
  14. this.fetchTodos();
  15. }
  16. };
  17. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement