diff --git a/.workbuddy/memory/2026-08-17.md b/.workbuddy/memory/2026-08-17.md index 4786f0f..c5c6b45 100644 --- a/.workbuddy/memory/2026-08-17.md +++ b/.workbuddy/memory/2026-08-17.md @@ -16,3 +16,12 @@ - 新建 SectionSalesStatsModal.vue(时间筛选 + 汇总卡片 + 商品排行) - vite build 通过(exit 0) - 待办:后端需 maven 编译并部署到 shop-api.websoft.top 才生效(本环境未部署)。 + +## 修复专区商品抽屉分页点击无效 +- 文件:`src/views/special/zone/index.vue` +- 问题:抽屉里 `a-table` 的 `:pagination` 直接内联写 `{ current: goodsPage, pageSize: goodsPageSize, total: goodsTotal }`,对象属性中的 ref 不会被 Vue 自动解包,Pagination 拿到的是 ref 对象而非 number,导致分页按钮点不动。 +- 修复: + - 提取 `goodsPagination = computed(() => ({ total: goodsTotal.value, current: goodsPage.value, pageSize: goodsPageSize.value, showSizeChanger: true, onChange: ... }))` + - `:pagination="goodsPagination"` + - `onChange` 里 `loadGoods(currentSectionId.value)` 修正为 `.value` +- 验证:`vite build` 通过(exit 0)。 diff --git a/src/views/shop/statistics/components/GoodsRankTable.vue b/src/views/shop/shopStatistics/components/GoodsRankTable.vue similarity index 100% rename from src/views/shop/statistics/components/GoodsRankTable.vue rename to src/views/shop/shopStatistics/components/GoodsRankTable.vue diff --git a/src/views/shop/statistics/components/StatCard.vue b/src/views/shop/shopStatistics/components/StatCard.vue similarity index 100% rename from src/views/shop/statistics/components/StatCard.vue rename to src/views/shop/shopStatistics/components/StatCard.vue diff --git a/src/views/shop/statistics/components/StatusDistChart.vue b/src/views/shop/shopStatistics/components/StatusDistChart.vue similarity index 100% rename from src/views/shop/statistics/components/StatusDistChart.vue rename to src/views/shop/shopStatistics/components/StatusDistChart.vue diff --git a/src/views/shop/statistics/components/TrendChart.vue b/src/views/shop/shopStatistics/components/TrendChart.vue similarity index 100% rename from src/views/shop/statistics/components/TrendChart.vue rename to src/views/shop/shopStatistics/components/TrendChart.vue diff --git a/src/views/shop/statistics/index.vue b/src/views/shop/shopStatistics/index.vue similarity index 100% rename from src/views/shop/statistics/index.vue rename to src/views/shop/shopStatistics/index.vue diff --git a/src/views/special/zone/index.vue b/src/views/special/zone/index.vue index 1b83a78..2869a4c 100644 --- a/src/views/special/zone/index.vue +++ b/src/views/special/zone/index.vue @@ -153,17 +153,7 @@ row-key="goodsId" :dataSource="goodsList" :columns="goodsColumns" - :pagination="{ - total: goodsTotal, - current: goodsPage, - pageSize: goodsPageSize, - showSizeChanger: true, - onChange: (page: number, pageSize: number) => { - goodsPage.value = page; - goodsPageSize.value = pageSize; - loadGoods(currentSectionId); - } - }" + :pagination="goodsPagination" :scroll="{ y: 380 }" size="small" > @@ -222,7 +212,7 @@