@next-bricks/presentational-bricks 1.252.1 → 1.253.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stories.json CHANGED
@@ -3222,64 +3222,68 @@
3222
3222
  "name": "inputFormat",
3223
3223
  "type": "string",
3224
3224
  "required": "false",
3225
- "default": "-",
3226
- "description": "字符串的时间格式,如 \"YYYY-MM-DD\""
3225
+ "description": "字符串的时间格式,如 \"YYYY-MM-DD\", [时间格式参照表](https://dayjs.gitee.io/docs/zh-CN/parse/string-format)",
3226
+ "group": "basic"
3227
3227
  },
3228
3228
  {
3229
3229
  "name": "outputFormat",
3230
3230
  "type": "string",
3231
3231
  "required": "false",
3232
- "default": "-",
3233
- "description": "展示时间格式,如 \"YYYY-MM-DD\",当设置该属性时,属性 `formatter` 无效"
3232
+ "description": "展示时间格式,如 \"YYYY-MM-DD\",当设置该属性时,属性 `formatter` 无效 [时间格式参照表](https://dayjs.gitee.io/docs/zh-CN/parse/string-format)",
3233
+ "group": "basic"
3234
3234
  },
3235
3235
  {
3236
3236
  "name": "dataSource",
3237
3237
  "type": "Record<string, any>",
3238
3238
  "required": "false",
3239
- "default": "-",
3240
- "description": "[已废弃]数据来源"
3239
+ "description": "[已废弃]数据来源",
3240
+ "deprecated": true,
3241
+ "group": "other"
3241
3242
  },
3242
3243
  {
3243
3244
  "name": "fields",
3244
- "type": "{ value: string }",
3245
+ "type": "object",
3245
3246
  "required": "false",
3246
- "default": "-",
3247
- "description": "[已废弃]字段映射, 跟 dataSource 一起使用来获得运行时对应字段的值"
3247
+ "description": "[已废弃]字段映射, 跟 dataSource 一起使用来获得运行时对应字段的值",
3248
+ "deprecated": true,
3249
+ "group": "other"
3248
3250
  },
3249
3251
  {
3250
3252
  "name": "value",
3251
3253
  "type": "number | string",
3252
3254
  "required": "false",
3253
- "default": "-",
3254
- "description": "时间截,或字符串,当为字符串时,应提供时间格式 `inputFormat`"
3255
+ "description": "时间截,或字符串,当为字符串时,应提供时间格式 `inputFormat`",
3256
+ "group": "basic"
3255
3257
  },
3256
3258
  {
3257
3259
  "name": "formatter",
3258
- "type": "full|default|relative|future|accurate|auto",
3260
+ "type": "\"full\" | \"default\" | \"relative\" | \"future\" | \"accurate\" | \"auto\"",
3259
3261
  "required": "false",
3260
- "default": "-",
3261
- "description": "枚举值:full, default, relative, future, accurate, auto"
3262
+ "description": "枚举值:full, default, relative, future, accurate, auto [类型链接](https://github.com/easyops-cn/next-libs/blob/207fe7ee3ac010ab860c23cd062216c8ca612f0c/libs/datetime/src/humanizeTime.ts#L9)",
3263
+ "group": "basic"
3262
3264
  },
3263
3265
  {
3264
3266
  "name": "isMicrosecond",
3265
3267
  "type": "boolean",
3266
3268
  "required": "false",
3267
3269
  "default": "false",
3268
- "description": "value 值的单位是否为毫秒"
3270
+ "description": "value 值的单位是否为毫秒",
3271
+ "group": "basic"
3269
3272
  },
3270
3273
  {
3271
3274
  "name": "isCostTime",
3272
3275
  "type": "boolean",
3273
3276
  "required": "false",
3274
3277
  "default": "false",
3275
- "description": "是否展示为耗费时间,例如:'1 个月 20 天'"
3278
+ "description": "是否展示为耗费时间,例如:'1 个月 20 天'",
3279
+ "group": "basic"
3276
3280
  },
3277
3281
  {
3278
3282
  "name": "link",
3279
3283
  "type": "LinkInfo",
3280
3284
  "required": "false",
3281
- "default": "-",
3282
- "description": "跳转链接,默认为空"
3285
+ "description": "跳转链接,默认为空",
3286
+ "group": "basic"
3283
3287
  }
3284
3288
  ],
3285
3289
  "interface": [
@@ -4740,45 +4744,166 @@
4740
4744
  "change": "新增状态,`EmptyResultStatus`, 与规范对齐"
4741
4745
  }
4742
4746
  ],
4743
- "memo": "```typescript\nexport enum BrickResultStatus {\n Success = \"success\",\n Error = \"error\",\n Info = \"info\",\n Warning = \"warning\",\n E404 = \"404\",\n E403 = \"403\",\n E500 = \"500\",\n}\n\nexport enum EmptyResultStatus {\n BrowserTooOld = \"browser-too-old\",\n Empty = \"empty\",\n NoData = \"no-data\",\n NoHistoryVersion = \"no-history-version\",\n NoVisitRecord = \"no-visit-record\",\n SearchEmpty = \"search-empty\",\n WelcomeToCreate = \"welcome-to-create\",\n}\n\nexport type IllustrationsStatus = \"illustrations\";\n\nexport interface IllustrationsConfig {\n imageStyle?: CSSProperties;\n name?: string;\n category?: string;\n}\n\n```",
4747
+ "memo": "",
4744
4748
  "properties": [
4745
4749
  {
4746
4750
  "name": "customTitle",
4747
4751
  "type": "string",
4748
4752
  "required": "false",
4749
- "default": "-",
4750
- "description": "主标题文字"
4753
+ "description": "主标题文字",
4754
+ "group": "basic"
4751
4755
  },
4752
4756
  {
4753
4757
  "name": "status",
4754
- "type": "`BrickResultStatus` | `EmptyResultStatus` | `IllustrationsStatus`",
4758
+ "type": "BrickResultStatus | EmptyResultStatus | IllustrationsStatus",
4755
4759
  "required": "true",
4756
4760
  "default": "-",
4757
- "description": "结果的状态, 决定图标和颜色"
4761
+ "description": "结果的状态, 决定图标和颜色",
4762
+ "group": "basic"
4758
4763
  },
4759
4764
  {
4760
4765
  "name": "subTitle",
4761
4766
  "type": "string",
4762
4767
  "required": "false",
4763
- "default": "-",
4764
- "description": "次标题文字"
4768
+ "description": "次标题文字",
4769
+ "group": "basic"
4765
4770
  },
4766
4771
  {
4767
4772
  "name": "icon",
4768
4773
  "type": "string",
4769
4774
  "required": "false",
4770
4775
  "default": "-",
4771
- "description": "[自定义图标](https://ant.design/components/icon-cn/), 仅当 status 为 `BrickResultStatus` 时有效"
4776
+ "description": "[自定义图标](https://ant.design/components/icon-cn/), 仅当 status 为 `BrickResultStatus` 时有效",
4777
+ "group": "ui"
4772
4778
  },
4773
4779
  {
4774
4780
  "name": "illustrationsConfig",
4775
4781
  "type": "IllustrationsConfig",
4776
4782
  "required": "false",
4777
4783
  "default": "{}",
4778
- "description": "自定义插画配置"
4784
+ "description": "自定义插画配置",
4785
+ "group": "other"
4779
4786
  }
4780
4787
  ],
4781
- "interface": []
4788
+ "interface": [
4789
+ {
4790
+ "name": "IllustrationsConfig",
4791
+ "typeParameter": null,
4792
+ "kind": "interface",
4793
+ "children": [
4794
+ {
4795
+ "name": "category",
4796
+ "type": "string",
4797
+ "required": false,
4798
+ "description": ""
4799
+ },
4800
+ {
4801
+ "name": "imageStyle",
4802
+ "type": "CSSProperties",
4803
+ "required": false,
4804
+ "description": ""
4805
+ },
4806
+ {
4807
+ "name": "name",
4808
+ "type": "string",
4809
+ "required": false,
4810
+ "description": ""
4811
+ }
4812
+ ],
4813
+ "indexSignature": []
4814
+ },
4815
+ {
4816
+ "name": "BrickResultStatus",
4817
+ "typeParameter": null,
4818
+ "kind": "enum",
4819
+ "children": [
4820
+ {
4821
+ "name": "E403",
4822
+ "value": "\"403\"",
4823
+ "description": ""
4824
+ },
4825
+ {
4826
+ "name": "E404",
4827
+ "value": "\"404\"",
4828
+ "description": ""
4829
+ },
4830
+ {
4831
+ "name": "E500",
4832
+ "value": "\"500\"",
4833
+ "description": ""
4834
+ },
4835
+ {
4836
+ "name": "Error",
4837
+ "value": "\"error\"",
4838
+ "description": ""
4839
+ },
4840
+ {
4841
+ "name": "Info",
4842
+ "value": "\"info\"",
4843
+ "description": ""
4844
+ },
4845
+ {
4846
+ "name": "Success",
4847
+ "value": "\"success\"",
4848
+ "description": ""
4849
+ },
4850
+ {
4851
+ "name": "Warning",
4852
+ "value": "\"warning\"",
4853
+ "description": ""
4854
+ }
4855
+ ]
4856
+ },
4857
+ {
4858
+ "name": "EmptyResultStatus",
4859
+ "typeParameter": null,
4860
+ "kind": "enum",
4861
+ "children": [
4862
+ {
4863
+ "name": "BrowserTooOld",
4864
+ "value": "\"browser-too-old\"",
4865
+ "description": ""
4866
+ },
4867
+ {
4868
+ "name": "Empty",
4869
+ "value": "\"empty\"",
4870
+ "description": ""
4871
+ },
4872
+ {
4873
+ "name": "NoData",
4874
+ "value": "\"no-data\"",
4875
+ "description": ""
4876
+ },
4877
+ {
4878
+ "name": "NoHistoryVersion",
4879
+ "value": "\"no-history-version\"",
4880
+ "description": ""
4881
+ },
4882
+ {
4883
+ "name": "NoVisitRecord",
4884
+ "value": "\"no-visit-record\"",
4885
+ "description": ""
4886
+ },
4887
+ {
4888
+ "name": "SearchEmpty",
4889
+ "value": "\"search-empty\"",
4890
+ "description": ""
4891
+ },
4892
+ {
4893
+ "name": "WelcomeToCreate",
4894
+ "value": "\"welcome-to-create\"",
4895
+ "description": ""
4896
+ }
4897
+ ]
4898
+ },
4899
+ {
4900
+ "name": "IllustrationsStatus",
4901
+ "typeParameter": null,
4902
+ "kind": "type",
4903
+ "description": "",
4904
+ "type": "\"illustrations\""
4905
+ }
4906
+ ]
4782
4907
  }
4783
4908
  },
4784
4909
  {
@@ -6285,7 +6410,7 @@
6285
6410
  "change": "新增 `shouldUpdateUrlParams` 属性和 `sort.update` 事件"
6286
6411
  }
6287
6412
  ],
6288
- "memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n### CustomColumn\n| property | type | required | default | description |\n| -------------------- | --------------------- | -------- | ------- | -------------------------------------------------------------- |\n| valueSuffix | string | - | - | 字段的值展示时的后缀 |\n| useBrick | UseBrickConf | - | - | 支持为某列自定义展示构件, 具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| titleUseBrick | UseBrickConf | - | - | 支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| filters | {text:string,value:any}[] | - | - | 表头的筛选菜单项 |\n| verticalAlign | top \\| bottom | - | - | 单元格内元素的垂直对齐方式 |\n| colSpanKey | string | - | - | 每条记录的控制列合并的值的 key |\n| rowSpanKey | string | - | - | 每条记录的控制行合并的值的 key。如果希望将树形列表展平,并计算行合并的值,可以使用 flattenTreeDataListAndCalcRowSpan 自定义加工函数 |、* | ~~component~~ | ~~CustomColumnComponent~~ | - | - | ~~Deprecated。支持为某列自定义展示构件~~ |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### <del>CustomColumnComponent</del>\n\n<details>\n<summary>展开</summary>\n\n| property | type | required | default | description |\n| ---------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| fields | {value: string; item: string; index: string} | ✔️ | - | 字段值、列表项和 index 对应所用构件的属性的 key |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n\n</details>\n\n### fields\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| fields | fieldsType | - | - | 设置相关字段取自哪里,具体描述见下表 |\n\n### fieldsType\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| dataSource | string | - | list | 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list |\n| total | string | - | total | 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total |\n| page | string | - | page | 指定下表中 \"page.update\" 事件 detail 的 pagePath |\n| pageSize | string | - | pageSize | 指定下表 \"filter.update\" 事件 detail 的 pageSizePath |\n| ascend | string | - | ascend | 指定 ascend 升序排序对应字段,例如有些后台对应为 1 ,有些对应为 \"asc\"。这里默认为 \"ascend\" |\n| descend | string | - | descend | 指定 descend 降序排序对应字段,例如有些后台对应为 0 ,有些对应为 \"desc\"。这里默认为 \"descend\" |\n\n### pagination 默认配置\n\n如果不希望分页,只需在 storyboard 中如下设置即可:\n\n```\n{\n \"configProps\": {\n \"pagination\": false\n }\n}\n```\n\n如果希望覆盖默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"configProps\": {\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,即如果不在 storyboard 中配置就不显示。如果要开启只需在 storyboard 中如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": true\n }\n}\n```\n\n如果希望覆盖或者扩展默认配置,只需在 storyboard 中覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"configProps\": {\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | Record<string, unknown>[] | ✔️ | - | 树形数据列表 |\n| options | FlattenTreeDataListAndCalcRowSpanOptions | ✔️ | - | 函数选项 |\n| depth | number | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Record<string, unknown>[] | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | FlattenConfig[] | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | boolean | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | string | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | string | ✔️ | - | 展平后,父级在子级的 key |",
6413
+ "memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n### CustomColumn\n| property | type | required | default | description |\n| -------------------- | --------------------- | -------- | ------- | -------------------------------------------------------------- |\n| valueSuffix | string | - | - | 字段的值展示时的后缀 |\n| useBrick | UseBrickConf | - | - | 支持为某列自定义展示构件, 具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| titleUseBrick | UseBrickConf | - | - | 支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| filters | {text:string,value:any}[] | - | - | 表头的筛选菜单项 |\n| verticalAlign | top \\| bottom | - | - | 单元格内元素的垂直对齐方式 |\n| colSpanKey | string | - | - | 每条记录的控制列合并的值的 key |\n| rowSpanKey | string | - | - | 每条记录的控制行合并的值的 key。如果希望将树形列表展平,并计算行合并的值,可以使用 flattenTreeDataListAndCalcRowSpan 自定义加工函数 |\n| ~~component~~ | ~~CustomColumnComponent~~ | - | - | ~~Deprecated。支持为某列自定义展示构件~~ |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### <del>CustomColumnComponent</del>\n\n<details>\n<summary>展开</summary>\n\n| property | type | required | default | description |\n| ---------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| fields | {value: string; item: string; index: string} | ✔️ | - | 字段值、列表项和 index 对应所用构件的属性的 key |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n\n</details>\n\n### fields\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| fields | fieldsType | - | - | 设置相关字段取自哪里,具体描述见下表 |\n\n### fieldsType\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| dataSource | string | - | list | 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list |\n| total | string | - | total | 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total |\n| page | string | - | page | 指定下表中 \"page.update\" 事件 detail 的 pagePath |\n| pageSize | string | - | pageSize | 指定下表 \"filter.update\" 事件 detail 的 pageSizePath |\n| ascend | string | - | ascend | 指定 ascend 升序排序对应字段,例如有些后台对应为 1 ,有些对应为 \"asc\"。这里默认为 \"ascend\" |\n| descend | string | - | descend | 指定 descend 降序排序对应字段,例如有些后台对应为 0 ,有些对应为 \"desc\"。这里默认为 \"descend\" |\n\n### pagination 默认配置\n\n如果不希望分页,如下设置即可:\n\n```\n{\n \"configProps\": {\n \"pagination\": false\n }\n}\n```\n\n如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"configProps\": {\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,不配置就不显示。如果要开启如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": true\n }\n}\n```\n\n如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"configProps\": {\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | Record<string, unknown>[] | ✔️ | - | 树形数据列表 |\n| options | FlattenTreeDataListAndCalcRowSpanOptions | ✔️ | - | 函数选项 |\n| depth | number | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Record<string, unknown>[] | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | FlattenConfig[] | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | boolean | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | string | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | string | ✔️ | - | 展平后,父级在子级的 key |",
6289
6414
  "properties": [
6290
6415
  {
6291
6416
  "name": "columns",
@@ -6297,7 +6422,7 @@
6297
6422
  },
6298
6423
  {
6299
6424
  "name": "dataSource",
6300
- "type": "any",
6425
+ "type": "any[]",
6301
6426
  "required": "false",
6302
6427
  "default": "-",
6303
6428
  "description": "数据源,通过 useResolves 从后台接口获取或者直接在 storyboard 中配置",
@@ -6313,7 +6438,7 @@
6313
6438
  },
6314
6439
  {
6315
6440
  "name": "hiddenColumns",
6316
- "type": "(string|number)[]",
6441
+ "type": "Array<string | number>",
6317
6442
  "required": "false",
6318
6443
  "default": "-",
6319
6444
  "description": "隐藏相应列(输入对应的 dataIndex 或者 key 即可)",
@@ -6329,7 +6454,7 @@
6329
6454
  },
6330
6455
  {
6331
6456
  "name": "filters",
6332
- "type": "Record<string,string[]>",
6457
+ "type": "Record<string, string[]>",
6333
6458
  "required": "false",
6334
6459
  "default": "-",
6335
6460
  "description": "表头过滤的过滤项,key 为 column 的 dataIndex,value 为过滤值集合。",
@@ -6345,7 +6470,7 @@
6345
6470
  },
6346
6471
  {
6347
6472
  "name": "configProps",
6348
- "type": "object",
6473
+ "type": "any",
6349
6474
  "required": "false",
6350
6475
  "default": "-",
6351
6476
  "description": "ant-design 的 Table 相关配置项,具体查阅:[Table](https://ant.design/components/table-cn/#Table),其中分页配置和行选择配值在构件中设置了常用的默认配置,也可自行覆盖,具体描述见下表",
@@ -6417,7 +6542,7 @@
6417
6542
  },
6418
6543
  {
6419
6544
  "name": "optimizedColumns",
6420
- "type": "(string|number)[]",
6545
+ "type": "Array<string | number>",
6421
6546
  "required": "false",
6422
6547
  "default": "-",
6423
6548
  "description": "优化渲染的列(输入对应的 dataIndex),针对配置了 useBrick 的列。当前 antd 在更新 state 的时候,会全量渲染单元格,如果确定某一列在后续操作中不需要重新渲染,例如仅作为展示的单元格,可通过该属性设置以优化性能。注意,在树形表格中,当某一列内包含展开/收起按钮,则不应该设置该列。",
@@ -6641,7 +6766,7 @@
6641
6766
  },
6642
6767
  {
6643
6768
  "name": "rowSelection",
6644
- "type": "false | TableRowSelection",
6769
+ "type": "false | TableRowSelection<any>",
6645
6770
  "required": "false",
6646
6771
  "default": "-",
6647
6772
  "description": "表格行是否可选择,具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)"
@@ -7416,6 +7541,7 @@
7416
7541
  {
7417
7542
  "name": "showTagCircle",
7418
7543
  "type": "boolean",
7544
+ "required": "false",
7419
7545
  "default": "false",
7420
7546
  "description": "是否在标签内显示小圆点",
7421
7547
  "group": "ui"
@@ -7423,6 +7549,7 @@
7423
7549
  {
7424
7550
  "name": "showCard",
7425
7551
  "type": "boolean",
7552
+ "required": "false",
7426
7553
  "default": "true",
7427
7554
  "description": "是否显示卡片",
7428
7555
  "group": "basic"
@@ -7430,6 +7557,7 @@
7430
7557
  {
7431
7558
  "name": "dataSource",
7432
7559
  "type": "Record<string, any>",
7560
+ "required": "false",
7433
7561
  "description": "数据源,通过 useResolves 从后台接口获取",
7434
7562
  "deprecated": true,
7435
7563
  "group": "other"
@@ -7437,12 +7565,14 @@
7437
7565
  {
7438
7566
  "name": "color",
7439
7567
  "type": "string | Color",
7568
+ "required": "false",
7440
7569
  "description": "标签的颜色配置,当 `componentType=Tag` 且 `closable!=true` 时才有效,除了提供内置八种主题色,也支持直接赋色值(如 `#f5f5f5`)使用",
7441
7570
  "group": "ui"
7442
7571
  },
7443
7572
  {
7444
7573
  "name": "componentType",
7445
7574
  "type": "TagTypeProps",
7575
+ "required": "false",
7446
7576
  "default": "\"Tag\"",
7447
7577
  "description": "组件类型,对应 ant-design 中的基本标签和可选中标签",
7448
7578
  "group": "basic"
@@ -7450,12 +7580,14 @@
7450
7580
  {
7451
7581
  "name": "default",
7452
7582
  "type": "string | string[]",
7583
+ "required": "false",
7453
7584
  "description": "componentType 为`CheckableTag`的时候默认选中的标签 key",
7454
7585
  "group": "basic"
7455
7586
  },
7456
7587
  {
7457
7588
  "name": "multipleCheck",
7458
7589
  "type": "boolean",
7590
+ "required": "false",
7459
7591
  "default": "true",
7460
7592
  "description": "是否能多选,多选场景下右上角会有小圆点提示",
7461
7593
  "group": "basic"
@@ -7463,6 +7595,7 @@
7463
7595
  {
7464
7596
  "name": "cancelable",
7465
7597
  "type": "boolean",
7598
+ "required": "false",
7466
7599
  "default": "true",
7467
7600
  "description": "标签是否可以取消单选,在 `componentType` 为 `CheckableTag` 且 `multipleCheck` 为 `false` 时生效。",
7468
7601
  "group": "basic"
@@ -7470,6 +7603,7 @@
7470
7603
  {
7471
7604
  "name": "closable",
7472
7605
  "type": "boolean",
7606
+ "required": "false",
7473
7607
  "default": "false",
7474
7608
  "description": "标签是否可以关闭",
7475
7609
  "group": "basic"
@@ -7477,30 +7611,35 @@
7477
7611
  {
7478
7612
  "name": "configProps",
7479
7613
  "type": "Record<string, any>",
7614
+ "required": "false",
7480
7615
  "description": "ant-design 相关配置项, [具体查阅](https://ant.design/components/tag-cn/#Tag) ,只有在 componentType=Tag 时才有效",
7481
7616
  "group": "other"
7482
7617
  },
7483
7618
  {
7484
7619
  "name": "disabledTooltip",
7485
7620
  "type": "string",
7621
+ "required": "false",
7486
7622
  "description": "禁用标签的 tooltip",
7487
7623
  "group": "basic"
7488
7624
  },
7489
7625
  {
7490
7626
  "name": "tooltipProps",
7491
7627
  "type": "TooltipProps",
7628
+ "required": "false",
7492
7629
  "description": "标签的 tooltip 相关配置项, [具体查阅](https://ant.design/components/tooltip-cn/#API)",
7493
7630
  "group": "other"
7494
7631
  },
7495
7632
  {
7496
7633
  "name": "label",
7497
7634
  "type": "string",
7635
+ "required": "false",
7498
7636
  "description": "标签前的 label",
7499
7637
  "group": "basic"
7500
7638
  },
7501
7639
  {
7502
7640
  "name": "fields",
7503
7641
  "type": "object",
7642
+ "required": "false",
7504
7643
  "default": "{ label: \"label\", key: \"key\", icon: \"icon\"}",
7505
7644
  "description": "这里可以规定从 dataSource 中的哪个字段取标签渲染的数据,例如 dataSource 返回的数据为 [{key:\"1\"},{key:\"2\"}],则可写成 {label: \"key\", key: \"key\"}",
7506
7645
  "deprecated": true,
@@ -7509,6 +7648,7 @@
7509
7648
  {
7510
7649
  "name": "textEllipsis",
7511
7650
  "type": "boolean",
7651
+ "required": "false",
7512
7652
  "default": "false",
7513
7653
  "description": "文字是否超出省略",
7514
7654
  "group": "ui"
@@ -7516,26 +7656,28 @@
7516
7656
  {
7517
7657
  "name": "tagStyle",
7518
7658
  "type": "Record<string, any>",
7659
+ "required": "false",
7519
7660
  "description": "标签的自定义样式",
7520
7661
  "group": "ui"
7521
7662
  },
7522
7663
  {
7523
7664
  "name": "tagCheckedStyle",
7524
7665
  "type": "Record<string, any>",
7666
+ "required": "false",
7525
7667
  "description": "标签选中的自定义样式",
7526
7668
  "group": "ui"
7527
7669
  },
7528
7670
  {
7529
7671
  "name": "tagHoverStyle",
7530
7672
  "type": "Record<string, any>",
7673
+ "required": "false",
7531
7674
  "description": "标签 Hover 的自定义样式",
7532
7675
  "group": "ui"
7533
7676
  },
7534
7677
  {
7535
7678
  "name": "afterBrick",
7536
- "type": "{useBrick: UseBrickConf,data: any}",
7679
+ "type": "object",
7537
7680
  "required": "false",
7538
- "default": "-",
7539
7681
  "description": "最后一个tag后面使用子构件,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf)",
7540
7682
  "group": "advanced"
7541
7683
  }
@@ -12794,42 +12936,49 @@
12794
12936
  {
12795
12937
  "name": "text",
12796
12938
  "type": "string",
12939
+ "required": "false",
12797
12940
  "description": "文字内容",
12798
12941
  "group": "basic"
12799
12942
  },
12800
12943
  {
12801
12944
  "name": "prefixIcon",
12802
12945
  "type": "MenuIcon",
12946
+ "required": "false",
12803
12947
  "description": "前缀图标",
12804
12948
  "group": "basic"
12805
12949
  },
12806
12950
  {
12807
12951
  "name": "suffixIcon",
12808
12952
  "type": "MenuIcon",
12953
+ "required": "false",
12809
12954
  "description": "后缀图标",
12810
12955
  "group": "basic"
12811
12956
  },
12812
12957
  {
12813
12958
  "name": "url",
12814
12959
  "type": "string",
12960
+ "required": "false",
12815
12961
  "description": "链接的 URL",
12816
12962
  "group": "basic"
12817
12963
  },
12818
12964
  {
12819
12965
  "name": "href",
12820
12966
  "type": "string",
12967
+ "required": "false",
12821
12968
  "description": "是否使用原生 <a> 标签,通常用于外链的跳转",
12822
12969
  "group": "basic"
12823
12970
  },
12824
12971
  {
12825
12972
  "name": "dataSource",
12826
12973
  "type": "any",
12974
+ "required": "false",
12827
12975
  "description": "`label.click`事件的传出的数据",
12828
12976
  "group": "other"
12829
12977
  },
12830
12978
  {
12831
12979
  "name": "data",
12832
12980
  "type": "any",
12981
+ "required": "false",
12833
12982
  "description": "`label.click`事件的详情",
12834
12983
  "deprecated": true,
12835
12984
  "group": "other"
@@ -13217,67 +13366,89 @@
13217
13366
  "name": "content",
13218
13367
  "type": "string | string[]",
13219
13368
  "required": "true",
13220
- "default": "-",
13221
- "description": "提示内容, 数组表示多行显示, 可根据平台提供的 transform 机制转换成所需的提示内容"
13369
+ "description": "提示内容, 数组表示多行显示, 可根据平台提供的 transform 机制转换成所需的提示内容",
13370
+ "group": "basic"
13222
13371
  },
13223
13372
  {
13224
13373
  "name": "icon",
13225
13374
  "type": "MenuIcon",
13226
13375
  "required": "true",
13227
- "default": "-",
13228
- "description": "图标配置 [MenuIcon](http://docs.developers.easyops.cn/docs/brick-next/icon)"
13376
+ "description": "图标配置 [MenuIcon](http://docs.developers.easyops.cn/docs/brick-next/icon)",
13377
+ "group": "basic"
13229
13378
  },
13230
13379
  {
13231
13380
  "name": "text",
13232
13381
  "type": "string",
13233
13382
  "required": "false",
13234
- "default": "-",
13235
- "description": "文案"
13383
+ "description": "文案",
13384
+ "group": "basic"
13236
13385
  },
13237
13386
  {
13238
13387
  "name": "iconContainerStyle",
13239
- "type": "object",
13388
+ "type": "CSSProperties",
13240
13389
  "required": "false",
13241
- "default": "-",
13242
- "description": "图标容器相关样式"
13390
+ "description": "图标容器相关样式",
13391
+ "group": "ui"
13243
13392
  },
13244
13393
  {
13245
13394
  "name": "type",
13246
13395
  "type": "tooltip | popover",
13247
13396
  "required": "false",
13248
13397
  "default": "tooltip",
13249
- "description": "类型设置"
13398
+ "description": "类型设置",
13399
+ "group": "basic"
13250
13400
  },
13251
13401
  {
13252
13402
  "name": "header",
13253
13403
  "type": "string",
13254
13404
  "required": "false",
13255
- "default": "-",
13256
- "description": "提示内容的标题, 当 type = popover 时才生效"
13405
+ "description": "提示内容的标题, 当 type = popover 时才生效",
13406
+ "group": "basic"
13257
13407
  },
13258
13408
  {
13259
13409
  "name": "tooltipConfig",
13260
- "type": "`TooltipConfig`",
13410
+ "type": "TooltipConfig",
13261
13411
  "required": "false",
13262
- "default": "-",
13263
- "description": "tooltip的配置,配置属性见TooltipConfig"
13412
+ "description": "tooltip的配置,配置属性见TooltipConfig",
13413
+ "group": "other"
13264
13414
  },
13265
13415
  {
13266
13416
  "name": "triggerByIcon",
13267
13417
  "type": "boolean",
13268
13418
  "required": "false",
13269
13419
  "default": "true",
13270
- "description": "是否只在icon上hover才显示tooltip,仅在不设置`displayBrick`时有效"
13420
+ "description": "是否只在icon上hover才显示tooltip,仅在不设置`displayBrick`时有效",
13421
+ "group": "other"
13271
13422
  },
13272
13423
  {
13273
13424
  "name": "displayBrick",
13274
- "type": "CustomBrick",
13425
+ "type": "DisplayBrick",
13275
13426
  "required": "false",
13276
- "default": "-",
13277
- "description": "自定义展示内容构件,设置后`icon`和`text`会无效"
13427
+ "description": "自定义展示内容构件,设置后`icon`和`text`会无效",
13428
+ "group": "basic"
13278
13429
  }
13279
13430
  ],
13280
13431
  "interface": [
13432
+ {
13433
+ "name": "DisplayBrick",
13434
+ "typeParameter": null,
13435
+ "kind": "interface",
13436
+ "children": [
13437
+ {
13438
+ "name": "data",
13439
+ "type": "any",
13440
+ "required": false,
13441
+ "description": ""
13442
+ },
13443
+ {
13444
+ "name": "useBrick",
13445
+ "type": "UseBrickConf",
13446
+ "required": true,
13447
+ "description": ""
13448
+ }
13449
+ ],
13450
+ "indexSignature": []
13451
+ },
13281
13452
  {
13282
13453
  "name": "TooltipConfig",
13283
13454
  "typeParameter": null,
@@ -14511,12 +14682,14 @@
14511
14682
  {
14512
14683
  "name": "value",
14513
14684
  "type": "string",
14685
+ "required": "false",
14514
14686
  "description": "markdown 展示内容",
14515
14687
  "group": "basic"
14516
14688
  },
14517
14689
  {
14518
14690
  "name": "dataSource",
14519
14691
  "type": "Record<string, any>",
14692
+ "required": "false",
14520
14693
  "description": "[已废弃]数据来源",
14521
14694
  "deprecated": true,
14522
14695
  "group": "advanced"
@@ -14524,6 +14697,7 @@
14524
14697
  {
14525
14698
  "name": "fields",
14526
14699
  "type": "object",
14700
+ "required": "false",
14527
14701
  "description": "[已废弃]字段映射, 跟 dataSource 一起使用来获得运行时 value",
14528
14702
  "deprecated": true,
14529
14703
  "group": "advanced"
@@ -14531,6 +14705,7 @@
14531
14705
  {
14532
14706
  "name": "imagePreview",
14533
14707
  "type": "boolean",
14708
+ "required": "false",
14534
14709
  "default": "true",
14535
14710
  "description": "markdown 图片是否支持预览",
14536
14711
  "group": "basic"