ข้อมูลบุคคล: ต่อAPI
This commit is contained in:
parent
47e96ddec5
commit
338c2a3b7d
12 changed files with 415 additions and 198 deletions
|
|
@ -10,7 +10,8 @@ const { date2Thai } = useCounterMixin();
|
|||
|
||||
export const usePersonalDataStore = defineStore("PersonalData", () => {
|
||||
const row = ref<DataRow[]>([]);
|
||||
function fetchData(data: DataResponse[]) {
|
||||
|
||||
function save(data: DataResponse[]) {
|
||||
const list = data.map((e) => ({
|
||||
...e,
|
||||
createdAt: e.createdAt ? date2Thai(e.createdAt) : "",
|
||||
|
|
@ -19,7 +20,7 @@ export const usePersonalDataStore = defineStore("PersonalData", () => {
|
|||
row.value = list;
|
||||
}
|
||||
return {
|
||||
fetchData,
|
||||
save,
|
||||
row,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue