thainnv-dev: Nhúng

This commit is contained in:
nguyen van thai
2024-06-06 13:29:22 +07:00
parent 0a7774b7f4
commit c217ed82c9
25 changed files with 382 additions and 45 deletions
+20
View File
@@ -0,0 +1,20 @@
export const usePollStore = defineStore('usepollStore', () => {
async function fetchById(id: string) {
const { data, error } = await useFetch<any>(`/api/services/poll-by-id`, {
query: {
pollId: id
}
})
if(error.value) {
return null
}
return data.value
}
return { fetchById }
})
if(import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useTagStore, import.meta.hot))
}