feat(client): 库存列表收尾——副标/toolbar 间距/移动端 golden
- 副标(还原原型 .head .sub):KPI 上方「共 N 个商品 · 数据实时」(千分位) - toolbar 间距 token 化:搜索框对齐原型 240,间隔走 AppDims.sp2/sp3 - 移动端 golden:窄屏(390)卡片流路径 ×三主题入回归闸 - 顺带修 DataTableCard 分页条窄屏横向溢出(mobile 隐藏每页选择器, golden 闸抓出的预存 bug) analyze 0 error · flutter test +175(库存桌面/移动各 3 golden 全过)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -83,6 +83,8 @@ class _DataTableCardState extends State<DataTableCard> {
|
||||
pageSize: widget.pageSize,
|
||||
onPageChanged: widget.onPageChanged,
|
||||
onPageSizeChanged: widget.onPageSizeChanged,
|
||||
// 窄屏隐藏「每页 N 条」选择器,给翻页让位,避免横向溢出
|
||||
compact: context.isMobile,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -207,6 +209,7 @@ class _PaginationBar extends StatelessWidget {
|
||||
final int pageSize;
|
||||
final ValueChanged<int>? onPageChanged;
|
||||
final ValueChanged<int>? onPageSizeChanged;
|
||||
final bool compact;
|
||||
|
||||
static const _pageSizeOptions = [10, 20, 50, 100];
|
||||
|
||||
@@ -216,6 +219,7 @@ class _PaginationBar extends StatelessWidget {
|
||||
required this.pageSize,
|
||||
this.onPageChanged,
|
||||
this.onPageSizeChanged,
|
||||
this.compact = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -225,8 +229,8 @@ class _PaginationBar extends StatelessWidget {
|
||||
final effectiveSize = _pageSizeOptions.contains(pageSize) ? pageSize : _pageSizeOptions.first;
|
||||
return Row(
|
||||
children: [
|
||||
// 每页条数选择器
|
||||
if (onPageSizeChanged != null) ...[
|
||||
// 每页条数选择器(窄屏隐藏,避免溢出)
|
||||
if (onPageSizeChanged != null && !compact) ...[
|
||||
Text('每页', style: TextStyle(fontSize: 13, color: context.tokens.muted)),
|
||||
const SizedBox(width: 4),
|
||||
DropdownButtonHideUnderline(
|
||||
|
||||
Reference in New Issue
Block a user