diff --git a/src/store/category.js b/src/store/category.js index facc4d2..3804881 100644 --- a/src/store/category.js +++ b/src/store/category.js @@ -22,7 +22,7 @@ export class Category { async getData() { try { 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; return item }) ?? []