From 4fe4e985f6f5629442f3c361de135ede2d3a8a4b Mon Sep 17 00:00:00 2001 From: liu <2302563948@qq.com> Date: Thu, 20 Aug 2026 16:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=83=E5=B1=80=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/components/XinTable/index.tsx | 3 ++- web/layout/index.tsx | 4 +++- web/pages/dashboard/analysis.tsx | 3 +++ web/pages/page-layout/descriptions.tsx | 1 + web/pages/purchase/order.tsx | 3 +++ web/pages/recon/bill.tsx | 2 ++ web/pages/recon/payment.tsx | 1 + 7 files changed, 15 insertions(+), 2 deletions(-) diff --git a/web/components/XinTable/index.tsx b/web/components/XinTable/index.tsx index 53fccd7..c445738 100644 --- a/web/components/XinTable/index.tsx +++ b/web/components/XinTable/index.tsx @@ -548,13 +548,14 @@ export default function XinTable = any>(props: Xin { ...actionBarRender() } {...toolBarRender()} - {/* 表格 */} + {/* 表格(默认横向滚动:窄屏/平板下表格内部滚动而非撑宽整页) */} { { layout === "columns" ? : } )} - + {/* min-w-0:flex 子项默认 min-width:auto 会被宽表格撑破, + 归零后内容区宽度收敛到视口,表格自身的横向滚动才生效 */} + diff --git a/web/pages/dashboard/analysis.tsx b/web/pages/dashboard/analysis.tsx index ff8144f..ff382e2 100644 --- a/web/pages/dashboard/analysis.tsx +++ b/web/pages/dashboard/analysis.tsx @@ -429,6 +429,7 @@ const Index: React.FC = () => { rowKey={"product_id"} dataSource={dashboard.top_products} pagination={false} + scroll={{ x: 'max-content' }} columns={[ { title: t("dashboard.analysis.rank"), @@ -472,6 +473,7 @@ const Index: React.FC = () => { rowKey={"store_id"} dataSource={dashboard.top_stores} pagination={false} + scroll={{ x: 'max-content' }} columns={[ { title: t("dashboard.analysis.rank"), @@ -558,6 +560,7 @@ const Index: React.FC = () => { rowKey={"id"} dataSource={dashboard.latest_orders} pagination={false} + scroll={{ x: 'max-content' }} columns={[ { title: t("dashboard.analysis.orderNo"), diff --git a/web/pages/page-layout/descriptions.tsx b/web/pages/page-layout/descriptions.tsx index b036bc4..fb98a2e 100644 --- a/web/pages/page-layout/descriptions.tsx +++ b/web/pages/page-layout/descriptions.tsx @@ -217,6 +217,7 @@ const Layout = () => { columns={productColumns} dataSource={productData} pagination={false} + scroll={{ x: 'max-content' }} summary={() => ( diff --git a/web/pages/purchase/order.tsx b/web/pages/purchase/order.tsx index 7a45b9a..1418c76 100644 --- a/web/pages/purchase/order.tsx +++ b/web/pages/purchase/order.tsx @@ -1061,6 +1061,7 @@ const PurchaseOrderPage: React.FC = () => { columns={storeColumns} dataSource={storeSummary.items} pagination={false} + scroll={{ x: 'max-content' }} summary={renderStoreTotal} /> ) : ( @@ -1111,6 +1112,7 @@ const PurchaseOrderPage: React.FC = () => { columns={supplierColumns} dataSource={supplierItems} pagination={false} + scroll={{ x: 'max-content' }} summary={renderSupplierTotal} /> ) : ( @@ -1130,6 +1132,7 @@ const PurchaseOrderPage: React.FC = () => { columns={billColumns} dataSource={detail.bills} pagination={false} + scroll={{ x: 'max-content' }} summary={renderBillSummary} /> ) : ( diff --git a/web/pages/recon/bill.tsx b/web/pages/recon/bill.tsx index 95e0a2c..b8041da 100644 --- a/web/pages/recon/bill.tsx +++ b/web/pages/recon/bill.tsx @@ -418,6 +418,7 @@ const BillPage: React.FC = () => { columns={itemColumns} dataSource={detail.items} pagination={false} + scroll={{ x: 'max-content' }} summary={renderItemSummary} /> @@ -431,6 +432,7 @@ const BillPage: React.FC = () => { columns={orderColumns} dataSource={detail.orders} pagination={false} + scroll={{ x: 'max-content' }} /> ) : null} diff --git a/web/pages/recon/payment.tsx b/web/pages/recon/payment.tsx index 57df5f6..b4b0986 100644 --- a/web/pages/recon/payment.tsx +++ b/web/pages/recon/payment.tsx @@ -342,6 +342,7 @@ const PaymentPage: React.FC = () => { columns={billColumns} dataSource={detail.bills} pagination={false} + scroll={{ x: 'max-content' }} /> ) : null}