feat(client): 所有表格列头加筛选,图标更大靠右对齐
FilterableColumnHeader: - mainAxisAlignment.spaceBetween 将图标推到列头右侧 - 漏斗图标从 13px 增大到 16px,清除图标 14px 各页面改动: - batch_tracking:状态/仓库/供应商筛选移入列头,工具栏合并为一行 - finance:类型/往来单位筛选移入列头,工具栏保留月份选择和显示字段 - inventory:仓库筛选从 API 端单选改为客户端多选,移入"仓库"列头 - products:品牌列头加筛选,从加载数据中动态派生选项 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,31 +176,37 @@ class _FilterableColumnHeaderState extends State<FilterableColumnHeader> {
|
||||
onEnter: (_) => setState(() => _hovered = true),
|
||||
onExit: (_) => setState(() => _hovered = false),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(widget.text),
|
||||
AnimatedOpacity(
|
||||
opacity: showIcon ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 120),
|
||||
child: InkWell(
|
||||
onTap: widget.options.isEmpty ? null : () => _show(context),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 2),
|
||||
child: Icon(
|
||||
active ? Icons.filter_alt : Icons.filter_alt_outlined,
|
||||
size: 13,
|
||||
color: active ? AppTheme.primary : AppTheme.textSecondary,
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AnimatedOpacity(
|
||||
opacity: showIcon ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 120),
|
||||
child: InkWell(
|
||||
onTap: widget.options.isEmpty ? null : () => _show(context),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
||||
child: Icon(
|
||||
active ? Icons.filter_alt : Icons.filter_alt_outlined,
|
||||
size: 16,
|
||||
color: active ? AppTheme.primary : AppTheme.textSecondary,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (active)
|
||||
InkWell(
|
||||
onTap: () => widget.onChanged({}),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: const Icon(Icons.cancel, size: 14,
|
||||
color: AppTheme.primary),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (active)
|
||||
InkWell(
|
||||
onTap: () => widget.onChanged({}),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: const Icon(Icons.cancel, size: 12, color: AppTheme.primary),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user