feat(platform): preserve vehicle context in customer tasks

This commit is contained in:
lingniu
2026-07-05 19:07:50 +08:00
parent e48ea7d22a
commit 08c275af34
4 changed files with 53 additions and 5 deletions

View File

@@ -131,6 +131,7 @@ export function AppShell({
currentVehicleLabel,
currentVehicleConsistency,
onChange,
onCustomerTask,
onVehicleSearch,
children
}: {
@@ -143,6 +144,7 @@ export function AppShell({
currentVehicleLabel?: string;
currentVehicleConsistency?: VehicleSourceConsistency;
onChange: (page: PageKey) => void;
onCustomerTask?: (page: PageKey) => void;
onVehicleSearch: (keyword: string) => void | Promise<void>;
children: ReactNode;
}) {
@@ -212,7 +214,7 @@ export function AppShell({
key={item.page}
type="button"
className={selectedPage === item.page ? 'vp-customer-task-dispatch-action vp-customer-task-dispatch-action-active' : 'vp-customer-task-dispatch-action'}
onClick={() => onChange(item.page)}
onClick={() => (onCustomerTask ?? onChange)(item.page)}
aria-label={`客户任务 ${item.label} ${item.question}`}
>
<strong>{item.label}</strong>