Skip to content

[P2] config: sort must be nested under options.sort — surprising, no doc example #1317

Description

@xuyushun441-sys

来源:docs/PLATFORM_GAPS_FROM_TEMPLATES.md 第 15 条(P2)。

现象

列表视图 / dashboard table widget 的 sort 配置必须嵌在 options.sort,而不是顶层 sort。该约定不直观,文档也无示例:

// 直觉写法(不工作):{type: 'table',sort: [{field: 'priority',order: 'desc'}]}// 真实写法:{type: 'table',options: {sort: [{field: 'priority',order: 'desc'}]}}

模板作者反复踩坑。

建议范围

M1:二选一

  • (a) 兼容顶层 sort(推荐)
  • (b) 强制 options.sort,但 schema 校验报清晰错误 + 文档示例

M2:文档

  • 在 dashboard / view 章节加显式示例
  • TS 类型让 IDE 直接报错

验收

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationpriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions