Appearance
其他事件
注意
该事件为订阅异步回调事件
用法示例
js
//事件
onEvent(e) {
console.log(e.detail)
}js
function onEvent(e : JSONObject) {
console.log("onEvent:" + e.toJSONString())
}回调示例
json
{
"type": "onInitResult",
"data": {
"data": {
"type": "initSuccess"
},
"message": "",
"code": 0
}
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.type | String | 类型,具体类型如下:onInitResult:初始化结果onRecognitionProcess:识别过程 |
| data.data | Object | 类型下的回调数据 |
| data.data.type | String | 类型下的回调类型,类型如下:initSuccess:组件初始化完成 |
| data.data.code | Integer | 识别过程异常时code值 |
| data.data.message | Integer | 识别过程异常时消息 |
| code | Integer | 返回类型,0.成功,其他:失败 |

