[폴더, 파일 구조 정리]
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
export const useCounterStore = defineStore("counter", () => {
|
||||
const count = ref(0);
|
||||
const name = ref("Counter Store");
|
||||
|
||||
const doubleCount = computed(() => count.value * 2);
|
||||
|
||||
function increment() {
|
||||
count.value++;
|
||||
}
|
||||
|
||||
function decrement() {
|
||||
count.value--;
|
||||
}
|
||||
|
||||
function reset() {
|
||||
count.value = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
count,
|
||||
name,
|
||||
doubleCount,
|
||||
increment,
|
||||
decrement,
|
||||
reset,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user