counter.js 236 B

12345678910111213141516171819
  1. import {
  2. defineStore
  3. } from 'pinia'
  4. const useCounterStore = defineStore('counterTwo', {
  5. state() {
  6. return {
  7. count: 111
  8. }
  9. },
  10. getters: {},
  11. actions: {
  12. increment() {
  13. this.count-=1
  14. }
  15. }
  16. });
  17. export default useCounterStore;