apkt-eis/src/stores/posts.ts
2024-02-01 22:21:41 +07:00

16 lines
338 B
TypeScript

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