# wmpf.onVehicleChargeStatusChange(function callback)

> 需 WMPF >= 2.2.0 支持。

监听车辆充电状态变化事件

## 参数

### Object object

| 属性     | 类型     | 默认值 | 必填 | 说明     |
|----------|----------|--------|------|----------|
| callback | function |        | 是   | 回调函数 |

### object.callback 回调函数

#### 参数

#### Object res

| 属性              | 类型   | 说明                                         |
|-------------------|--------|----------------------------------------------|
| chargeState       | string | `CHARGER_CONNECTED` / `CHARGER_DISCONNECTED` |
| data.chargerBrand | string | 充电桩品牌                                   |
| data.chargerId    | string | 充电桩 ID                                    |

## 示例代码

```js
wmpf.onVehicleChargeStatusChange((res) => {
  console.log(res.chargeState)
})
```
