Skip to content

Commit

Permalink
chore: add new component
Browse files Browse the repository at this point in the history
  • Loading branch information
whatsaaaa committed Apr 15, 2021
1 parent 229e772 commit 15cbb2f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions templates/plugin/src/components/Counter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<script>
import { defineComponent } from "vue";
import { mapState, mapActions } from "vuex";
export default defineComponent({
name: "Counter",
computed: {
...mapState("counterModule", ["counter"])
},
methods: {
...mapActions({
increment: "counterModule/incrementCounter",
decrement: "counterModule/decrementCounter"
})
}
});
</script>

<template>
<div class="counter">
<p>Count: {{ counter }}</p>
<p>
<button @click="increment">+</button>
<button @click="decrement">-</button>
</p>
</div>
</template>

0 comments on commit 15cbb2f

Please sign in to comment.