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
13 lines
306 B
TypeScript
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 }
|
|
})
|