From 4ab90c9d89c2b2d9cf116ebe0e850f57a055a433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Tue, 28 Jul 2026 19:44:12 +0800 Subject: [PATCH] =?UTF-8?q?style(shop):=20=E4=BC=98=E5=8C=96=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=92=8C=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加商品列表表格横向滚动支持,避免列溢出 - 设置商品图片高度,保持缩略图统一尺寸 - 修改商品状态标签文案为“出售中” - 调整订单商品明细列,支持展开与收起全部商品 - 在订单列表操作列中新增竖线分隔符,提升按钮分隔清晰度 - 统一订单操作按钮文本,去除图标依赖 - 注释掉商品列表中排序号列 - 微调表格中部分列宽及对齐方式提高视觉体验 --- .workbuddy/memory/2026-07-28.md | 6 ++ src/views/shop/shopGoods/index.vue | 27 +++++---- src/views/shop/shopOrder/index.vue | 96 +++++++++++++++++++++--------- 3 files changed, 87 insertions(+), 42 deletions(-) create mode 100644 .workbuddy/memory/2026-07-28.md diff --git a/.workbuddy/memory/2026-07-28.md b/.workbuddy/memory/2026-07-28.md new file mode 100644 index 0000000..4b83cf5 --- /dev/null +++ b/.workbuddy/memory/2026-07-28.md @@ -0,0 +1,6 @@ +# 2026-07-28 + +## 订单列表操作列分隔线对齐 shopGoods +- 文件:`src/views/shop/shopOrder/index.vue` 的 `column.key === 'action'` 操作列模板。 +- 改动:原本操作列按钮只用 `` 包裹、无分隔线;现按 `shop/shopGoods` 的写法,在「详情」与各条件块之间、以及块内多个按钮之间加入 ``。 +- 分隔线放在各 ` @@ -400,16 +431,6 @@ } from 'ele-admin-pro/es/ele-pro-table/types'; import { ExclamationCircleOutlined, - EyeOutlined, - EditOutlined, - CloseOutlined, - SendOutlined, - UndoOutlined, - CheckOutlined, - CheckCircleOutlined, - CloseCircleOutlined, - RedoOutlined, - DeleteOutlined, InfoCircleOutlined } from '@ant-design/icons-vue'; import Search from './components/search.vue'; @@ -457,6 +478,24 @@ validTabs.includes(tabFromQuery) ? tabFromQuery : 'all' ); + // 商品明细展开状态:记录已展开商品明细的订单 orderId + const expandedOrderIds = ref>(new Set()); + // 商品明细默认折叠时显示的条数 + const collapsedGoodsCount = 2; + // 当前订单的商品明细是否已展开 + const isOrderGoodsExpanded = (record: ShopOrder) => + expandedOrderIds.value.has(String(record.orderId)); + // 切换订单商品明细的展开/收起 + const toggleOrderGoodsExpanded = (record: ShopOrder) => { + const next = new Set(expandedOrderIds.value); + if (next.has(String(record.orderId))) { + next.delete(String(record.orderId)); + } else { + next.add(String(record.orderId)); + } + expandedOrderIds.value = next; + }; + // ============ 新订单提醒 ============ const { enabled: notifyEnabled, toggle: onNotifyToggle, testNotify: onTestNotify, clearBadge } = useOrderNotify({ onNewOrder: () => reload() @@ -575,9 +614,8 @@ { title: '操作', key: 'action', - width: 240, + width: 220, fixed: 'right', - align: 'center', hideInSetting: true } ]);