繁体   English   中英

Office Fabric UI自定义标头

[英]Office Fabric UI custom headers

我正在使用Office Fabric UI React Detaillist组件。 我想在标题下方添加标题,如下所示:

在此处输入图片说明

请帮助使用offffice Fabric UI React实现此目的。 参考提供了Fabric UI反应详细信息列表,如下所示:

https://developer.microsoft.com/en-us/fabric#/components/detailslist

Fabric ui的文档确实过时了。 软件包会定期更新(很棒)。

考虑更好地了解github上的源代码/示例。

https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/DetailsList/DetailsList.types.ts#L299中查看IColumn类型

它有

   /**
   * If provided uses this method to render custom cell content, rather than the default text rendering.
   */
  onRender?: (item?: any, index?: number, column?: IColumn) => any;

您可以利用它以任意方式呈现标头单元格。

这里有些例子

https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.CustomColumns.Example.tsx

https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/DetailsList/examples/DetailsList.CustomGroupHeaders.Example.tsx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM