element_getStyles
Retrieve specific CSS style values from a WeChat Mini Program element by specifying the element selector and an array of style property names.
Instructions
获取元素的样式值。names 为样式名数组(如 ['color', 'fontSize', 'backgroundColor'])。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>",
"names": "<names>"
},
"name": "element_getStyles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| selector | Yes | ||
| innerSelector | No | ||
| names | Yes |