描述
主要用于获取元素内容、已选择项等功能。
接口
object GetElementsContent(ids:[] , jsonCfg: {})
获取元素内容
let result = thinkEditor.GetElementsContent(["简要诊断", "name"], {});
ids 参数
参数名 | 必填 | 类型 | 说明 | 备注 |
---|---|---|---|---|
元素id数组 | 是 | string arr | 为空[]时 返回所有有Id元素值,不为空数组时按Id提取元素值 | 示例:[ ]或 [“id2”,”id3”] |
jsonCfg参数
参数名 | 必填 | 类型 | 说明 | 备注 |
---|---|---|---|---|
subDocName | 否 | string | 文档合并时,限定提取的子文档名 | 为””时 不限制子文档名 |
入参示例
thinkEditor.GetElementsContent(
[
"id2",
"id3"
]
,{});
返回值
类型 | 说明 | 备注 |
---|---|---|
object |
[
{
"id": "id2",
"name": "",
"empty": false,
"text": "男",
"fragment": "<Fragment><Element id='id2' cfg='30000' inputMode='2' optionClass='系统' optionId='性别' linkStr='、' items='1' hint='请输入'>男<\/Element><\/Fragment>"
},
{
"id": "id3",
"name": "",
"empty": false,
"text": "男、未",
"fragment": "<Fragment><Element id='id3' cfg='30000' xCfg='100' inputMode='2' optionClass='系统' optionId='性别' linkStr='、' items='1;9' hint='请输入'>男、未<\/Element><\/Fragment>"
}
]
文档更新时间: 2025-04-24 11:36 作者:admin