Sidebar

zh:manual:api:reference:screenitem:update

screenitem.update

描述

object screenitem.update(object/array screenItems)

更新现有聚合图形项目的方法.

参数

(object/array) Screen item properties 更新.

必须定义每个聚合图形项目的screenitemid,其他属性可选,聚合图形项目的更新只能通过输入的参数,没有输入参数的内容将不改变.

返回值

(对象) 返回更新聚合图形项目下screenitemids属性的对象ID.

示例

设置聚合图形项目的大小

设置聚合图形项目的宽度为500px和高度为300px.

Request:

{
    "jsonrpc": "2.0",
    "method": "screenitem.update",
    "params": {
        "screenitemid": "20",
        "width": 500,
        "height": 300
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}

Response:

{
    "jsonrpc": "2.0",
    "result": {
        "screenitemids": [
            "20"
        ]
    },
    "id": 1
}

参考

来源

CScreenItem::update() in frontends/php/include/classes/api/services/CScreenItem.php.