fix: category store mapping

This commit is contained in:
rarsyansyahr 2021-12-17 06:06:52 +07:00
parent 4f82f9d978
commit 8c9a3b05de

View File

@ -22,7 +22,7 @@ export class Category {
async getData() { async getData() {
try { try {
const response = await http.get(`/product/categories?page=${this.page}&pageSize=${this.pageSize}`); const response = await http.get(`/product/categories?page=${this.page}&pageSize=${this.pageSize}`);
this.data = response.body.data .map((item, idx) => { this.data = response.body.data.map((item, idx) => {
item.key = idx; item.key = idx;
return item return item
}) ?? [] }) ?? []