对于ag-grid vuejs,如何在标题和单元格中包装文本?
这是我的示例代码。
https://codesandbox.io/embed/x98omwov3o
不确定在标题中包装文本,但这是你可以为单元格做的。
在您的ColDef中,提供这两个属性。
ColDef
cellClass: "cell-wrap-text", autoHeight: true,
CSS会像这样:.cell-wrap-text { white-space: normal !important; }
.cell-wrap-text { white-space: normal !important; }
还有一个可用于标题的属性,headerClass: "cell-wrap-text",但我还没有实现它。
headerClass: "cell-wrap-text"
希望它有所帮助。