init vue project

This commit is contained in:
2023-04-27 14:07:39 +02:00
parent 2e55f3df90
commit fb92e5a0b0
35 changed files with 9662 additions and 9 deletions

12
src/stores/counter.js Normal file
View File

@ -0,0 +1,12 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})