Description
- Description of the checkbox widget
Interface version
Version number |
Writer |
Date |
Description |
1.0 |
Qin Zhitian |
June 29, 2021 |
initial release |
IP address
http:
API list
Name |
Description |
set |
set attributes |
get |
get attributes |
1. set
Description of request parameters
Parameter Name |
Type |
Description |
attr |
string |
attribute |
attr.action |
string |
action:on-‘checked’;off-‘unchecked’; click-‘click-event trigger’; |
Call example
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "on"
}
}
Note: set checkbox to be checked;
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "off"
}
}
Note: set checkbox to be unchecked;
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "click"
}
}
Note: click checkbox to trigger event callback.
Return example
{
"code": 0
}
Description of return parameters
Parameter Name |
Type |
Description |
result |
string |
result information |
result.code |
int |
error code |
Error Code
2. get
Description of request parameters
Parameter Name |
Type |
Description |
Call example
{
"wid": "s1",
"cmd" : "get"
}
Return example
{
"state": true,
"code": 0
}
Description of return parameters
Parameter Name |
Type |
Description |
result |
string |
result information |
result.code |
int |
error code |
result.state |
bool |
true/false,status of checkbox |
Error Code
文档更新时间: 2021-08-18 21:49 作者:plj