Files
UniVerse/frontend/src/stores/counter.ts
T
serega404 655ab1b5c5
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 5s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 9s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 3s
Инициализировал Vue
2026-05-08 00:56:44 +03:00

13 lines
306 B
TypeScript

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 }
})