feat(platform): add vehicle detail realtime shortcut
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user