init git
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export const useCategoriesStore = defineStore('categories', {
|
||||
state: () => {
|
||||
return {
|
||||
items: []
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async get() {
|
||||
const { status, data } = await useFetch('/api/categories');
|
||||
if (status.value == 'success')
|
||||
this.items = data.value
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user