We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
普通表与明细表使用options.colCell时,表头排序icon会消失,options.showDefaultHeaderActionIcon=true会失效,但透视表功能正常。
只用showDefaultHeaderActionIcon,排序icon正常: 加了colCell,排序icon消失: 透视表均正常:
import { TableSheet } from '@antv/s2'; import { ColCell } from "@antv/s2"; class CustomColCell extends ColCell { getTextStyle() { return super.getTextStyle(); } } fetch( 'https://assets.antv.antgroup.com/s2/basic-table-mode.json', ) .then((res) => res.json()) .then((data) => { const container = document.getElementById('container'); const s2DataConfig = { fields: { columns: ['province', 'city', 'type', 'price', 'cost'], }, meta: [ { field: 'province', name: '省份', }, { field: 'city', name: '城市', }, { field: 'type', name: '商品类别', }, { field: 'price', name: '价格', }, { field: 'cost', name: '成本', }, ], data, }; const s2Options = { width: 600, height: 480, showSeriesNumber: true, showDefaultHeaderActionIcon: false, customSVGIcons: [ { name: 'customKingIcon', svg: 'https://gw.alipayobjects.com/zos/bmw-prod/f44eb1f5-7cea-45df-875e-76e825a6e0ab.svg', }, ], colCell: (node, spreadsheet, headerConfig) => { return new CustomColCell(node, spreadsheet, headerConfig); }, }; const s2 = new TableSheet(container, s2DataConfig, s2Options); s2.render(); });
https://s2.antv.antgroup.com/zh/examples/basic/table/#table https://s2.antv.antgroup.com/zh/examples/custom/custom-order/#custom-order
普通表应该与透视表逻辑保持一致
The text was updated successfully, but these errors were encountered:
明细表对应 TableColCell, 这块文档有缺失, 后面会补充, 抱歉.
TableColCell
- import { ColCell } from "@antv/s2"; + import { TableColCell, TableDataCell, TableSeriesCell, TableCornerCell } from "@antv/s2"; - class CustomColCell extends ColCell {} + class CustomColCell extends TableColCell {}
Sorry, something went wrong.
No branches or pull requests
🏷 Version
Sheet Type
🖋 Description
普通表与明细表使用options.colCell时,表头排序icon会消失,options.showDefaultHeaderActionIcon=true会失效,但透视表功能正常。
只用showDefaultHeaderActionIcon,排序icon正常:
加了colCell,排序icon消失:
透视表均正常:
⌨️ Code Snapshots
🔗 Reproduce Link
https://s2.antv.antgroup.com/zh/examples/basic/table/#table
https://s2.antv.antgroup.com/zh/examples/custom/custom-order/#custom-order
😊 Expected Behavior
普通表应该与透视表逻辑保持一致
💻 System information
The text was updated successfully, but these errors were encountered: