element_getData
Retrieve data from a custom component instance. Use a path to fetch a specific value, or omit it to get the entire component data.
Instructions
读取自定义组件实例的渲染数据(element.data())。仅对自定义组件实例有效;读页面 data 用 page_getData。不传 path 返回整棵组件 data(可能很大、易超 token 上限,建议尽量传 path)。path 取精确子值,如 'list.0.id'(单条路径,不支持 page_getData 的 paths[] 多路径/[*] 通配)。结果超过 maxBytes(默认 50000B,最大 1000000B)会截断。要定位嵌套组件用 selector + innerSelector。selector 支持 [index=N](仅作用于 selector)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| maxBytes | No | ||
| selector | Yes | ||
| connection | No | 可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。 | |
| innerSelector | No |