Description
- Description of the label widget
Interface version
Version number |
Writer |
Date |
Description |
1.0 |
Qin Zhitian |
June 22, 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:click-‘click-trigger event’;set_text-‘set text content’;text_color-‘set text color’; |
attr.text |
string |
parameter: text content |
attr.color_R |
int |
parameter: value of R, 0-255; |
attr.color_G |
int |
parameter: value of G, 0-255; |
attr.color_B |
int |
parameter: value of B, 0-255; |
Call example
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "click"
}
}
Note: click a label to trigger event callback;
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "set_text",
"text":"welcome to 8ms"
}
}
Note: set the content of a label to "welcome to 8ms";
{
"wid": "s1",
"cmd" : "set",
"attr": {
"action": "text_color",
"color_R": 255,
"color_G": 0,
"color_B": 0
}
}
Note: set the text color of a label to R:255,G:0,B:0;
Return example
{
"code": 0
}
Description of return parameters
Parameter Name |
Type |
Description |
result |
string |
result information |
result.code |
int |
error code |
Error Code
文档更新时间: 2021-08-19 14:19 作者:plj