描述
查询表格行的属性。
接口
std::string GetRowProperties(identity : object, config: object)| 项目 | 说明 |
|---|---|
| 入参 | identity:行匹配条件,为 identity 通用身份对象 |
| 入参 | config:JSON 对象,当前仅 buildAttribute 生效(见 config-参数) |
参数
identity-参数
查询目标行的匹配条件,必须为 identity 通用身份对象(JSON 对象)
| 字段 | 类型 | 说明 |
|---|---|---|
id |
string | 按 id 查询 |
ids |
string[] | 按 id 列表批量查询 |
name |
string | 按 name 查询 |
uuid |
string | 按 uuid 查询 |
sourceClass |
string | 按数据源类型查询其下所有行 |
subDocName |
string | 限定在指定子文档范围内查询 |
config-参数
| 字段 | 类型 | 必填 | 默认值 | 含义 |
|---|---|---|---|---|
buildAttribute |
bool | 否 | false |
false=输出简版(身份 + 单元格树);true=输出完整配置属性(含行高、自动行高、标题行等只读字段) |
返回值
string,JSON 数组。数组中每个元素代表一行,字段取决于 buildAttribute:
buildAttribute = true:完整配置
在简版基础上,行对象额外包含:
| 字段 | 类型 | 含义 |
|---|---|---|
height |
string | 配置高度(cm,保留两位小数) |
adjustMode |
int | 自动行高模式 |
printVisibility |
int | 打印可见性:0/1/2 |
forbidSplit |
bool | 禁止拆分行 |
titleRow |
bool | 标题行 |
enterGenerateNewRow |
bool | 回车生成新行 |
cells[] 子项也会输出完整单元格配置(身份 + 行列索引 + 数据源 + 单元格排版/对齐等属性),由 Cell::get_config_properties 生成。
示例代码
auto result = editor.GetRowProperties({id:"rowId"}, {buildAttribute:true});文档更新时间: 2026-07-22 12:01 作者:admin