前置条件: 先阅读
../lark-shared/SKILL.md了解认证、全局参数和安全规则。
更新排序配置。
lark-cli base +view-set-sort \
--base-token app_xxx \
--table-id tbl_xxx \
--view-id viw_xxx \
--json [{"field":"fld_priority","desc":true}]
[
{ "field": "fld_priority", "desc": true }
]
| 参数 | 必填 | 说明 |
|---|---|---|
--base-token <token> |
是 | Base Token |
--table-id <id_or_name> |
是 | 表 ID 或表名 |
--view-id <id_or_name> |
是 | 视图 ID 或视图名 |
--json <body> |
是 | JSON 对象或数组 |
HTTP 方法和路径:
PUT /open-apis/base/v3/bases/:base_token/tables/:table_id/views/:view_id/sort
sort_config:数组,长度 0..10field:字段 id 或字段名,长度 1..100desc:可选,默认 false--json 既可传对象 {"sort_config":[...]},也可直接传数组 [...]sort_config{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":100,"description":"Field id or name"},"desc":{"type":"boolean","default":false,"description":"define how to sort records"}},"required":["field"],"additionalProperties":false},"minItems":0,"maxItems":10,"$schema":"http://json-schema.org/draft-07/schema#"}
grid / kanban / gallery / gantt。sort_config 最多 10 项,超出会直接失败。