feat(platform): add vehicle detail realtime shortcut

This commit is contained in:
lingniu
2026-07-04 07:04:55 +08:00
parent 0366144780
commit 84f578bcc7
3 changed files with 94 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ async function copyVehicleServiceURL() {
export function VehicleDetail({
vin,
protocol,
onOpenRealtime,
onOpenHistory,
onOpenRaw,
onOpenMileage,
@@ -75,6 +76,7 @@ export function VehicleDetail({
}: {
vin: string;
protocol?: string;
onOpenRealtime: (vin: string, protocol?: string) => void;
onOpenHistory: (vin: string, protocol?: string) => void;
onOpenRaw: (vin: string, protocol?: string) => void;
onOpenMileage: (vin: string, protocol?: string) => void;
@@ -226,6 +228,7 @@ export function VehicleDetail({
<Button icon={<IconSearch />} htmlType="submit" theme="solid" type="primary"></Button>
<Button icon={<IconRefresh />} onClick={() => load(query)} loading={loading}></Button>
<Button icon={<IconCopy />} onClick={copyVehicleServiceURL}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenRealtime(resolvedVIN, activeProtocol)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenHistory(resolvedVIN, activeProtocol)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenRaw(resolvedVIN, activeProtocol)}> RAW</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenMileage(resolvedVIN, activeProtocol)}></Button>