filter & storage

This commit is contained in:
probdg
2024-02-01 22:21:41 +07:00
parent f5fe6ae0e6
commit a278bb353c
13 changed files with 349 additions and 174 deletions

16
src/stores/posts.ts Normal file
View File

@@ -0,0 +1,16 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const usePostsStore = defineStore('posts', () => {
const posts = ref('')
const setData = (value: string) => {
posts.value = value
}
const getData = () => {
return posts.value
}
return {
setData,
getData,
}
})