feat(client): KPI 图标改用 lucide(与原型同源图形库)
原型图标源自 lucide-static(icons.js)。引入 lucide_icons_flutter 包, 库存屏 KPI 图标改 LucideIcons.box/database/box/triangleAlert,与原型一模一样 (不再用 Material 凑近似)。golden_harness 加载 Lucide package 字体(family 带 packages/ 前缀),golden 正确渲染。flutter test 242 通过。 后续:侧栏/顶栏/状态栏图标也逐步换 lucide(对照 shell.js)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -15,6 +15,7 @@ import '../../widgets/write_guard.dart';
|
||||
import '../../providers/inventory_provider.dart';
|
||||
import '../../widgets/data_table_card.dart';
|
||||
import '../../widgets/kpi_card.dart' show StatusPill; // 旧 tab/移动卡片用,待统一 DsBadge
|
||||
import 'package:lucide_icons_flutter/lucide_icons.dart';
|
||||
import '../../widgets/ds/ds_atoms.dart';
|
||||
import '../../widgets/ds/ds_kpi.dart';
|
||||
import '../../widgets/ds/ds_table.dart';
|
||||
@@ -646,7 +647,7 @@ class _InventoryListScreenState extends ConsumerState<InventoryListScreen> {
|
||||
title: 'SKU 总数',
|
||||
value: NumberFormat.decimalPattern()
|
||||
.format(summary?.skuCount ?? result.total),
|
||||
icon: Icons.inventory_2,
|
||||
icon: LucideIcons.box,
|
||||
tone: DsKpiTone.info,
|
||||
delta: '点击清筛选',
|
||||
onTap: () {
|
||||
@@ -666,7 +667,7 @@ class _InventoryListScreenState extends ConsumerState<InventoryListScreen> {
|
||||
DsKpi(
|
||||
title: '库存货值',
|
||||
value: summary != null ? yuanWan(summary.stockValue) : '—',
|
||||
icon: Icons.savings_outlined,
|
||||
icon: LucideIcons.database,
|
||||
tone: DsKpiTone.ok,
|
||||
delta: '按进价',
|
||||
),
|
||||
@@ -674,14 +675,14 @@ class _InventoryListScreenState extends ConsumerState<InventoryListScreen> {
|
||||
title: '在库数量',
|
||||
value: NumberFormat.decimalPattern()
|
||||
.format((summary?.inStockQty ?? 0).round()),
|
||||
icon: Icons.warehouse_outlined,
|
||||
icon: LucideIcons.box,
|
||||
tone: DsKpiTone.blue,
|
||||
delta: '件',
|
||||
),
|
||||
DsKpi(
|
||||
title: '缺货预警',
|
||||
value: '${summary?.shortageCount ?? 0}',
|
||||
icon: Icons.error_outline,
|
||||
icon: LucideIcons.triangleAlert,
|
||||
tone: DsKpiTone.alert,
|
||||
delta: (summary?.warningCount ?? 0) > 0
|
||||
? '需补货 ${summary!.warningCount} 项'
|
||||
|
||||
Reference in New Issue
Block a user