feat(platform): preserve vehicle context in topbar tasks

This commit is contained in:
lingniu
2026-07-05 19:11:10 +08:00
parent 08c275af34
commit 30c15ec8fd
2 changed files with 11 additions and 2 deletions

View File

@@ -272,7 +272,7 @@ export function AppShell({
<Tag color={amapConfigured ? 'green' : 'orange'}>{amapConfigured ? '高德地图就绪' : '高德地图待配置'}</Tag>
<div className="vp-topbar-quick-actions" aria-label="车辆服务快捷入口">
{quickActions.map((item) => (
<Button key={item.page} size="small" aria-label={item.ariaLabel} onClick={() => onChange(item.page)}>
<Button key={item.page} size="small" aria-label={item.ariaLabel} onClick={() => (onCustomerTask ?? onChange)(item.page)}>
{item.label}
</Button>
))}
@@ -281,7 +281,7 @@ export function AppShell({
size="small"
aria-label={`顶部${alertLabel}`}
className={alertClassName}
onClick={() => onChange('alert-events')}
onClick={() => (onCustomerTask ?? onChange)('alert-events')}
>
{alertLabel}
</Button>