@next-bricks/presentational-bricks 1.256.1 → 1.256.2

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
@@ -6415,7 +6415,7 @@
6415
6415
  "change": "新增 `shouldUpdateUrlParams` 属性和 `sort.update` 事件"
6416
6416
  }
6417
6417
  ],
6418
- "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### pagination 默认配置\n\n如果不希望分页,如下设置即可:\n\n```\n{\n \"pagination\": false\n}\n```\n\n如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\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 \"rowSelection\": true\n}\n```\n\n如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\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 |",
6418
+ "memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\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### pagination 默认配置\n\n如果不希望分页,如下设置即可:\n\n```\n{\n \"pagination\": false\n}\n```\n\n如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\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 \"rowSelection\": true\n}\n```\n\n如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\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 |",
6419
6419
  "properties": [
6420
6420
  {
6421
6421
  "name": "columns",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational-bricks",
3
- "version": "1.256.1",
3
+ "version": "1.256.2",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/easyops-cn/next-basics/tree/master/bricks/presentational-bricks",
6
6
  "license": "GPL-3.0",
@@ -55,5 +55,5 @@
55
55
  "@next-dll/ace": "*",
56
56
  "@next-dll/react-dnd": "*"
57
57
  },
58
- "gitHead": "3e43287516ebb8fdbcd63636a7deb9d88d52e28f"
58
+ "gitHead": "8eeb027647187a891e21d5cd1a07fda00b6e66c6"
59
59
  }