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
而且拖拽列头依然会执行到这块方法;内存持续飙升;
还有官网事例
期望能关注内存占用的问题
The text was updated successfully, but these errors were encountered:
这里是因为每一次重新布局都会重新绘制文本,计算行头的高度,我这边临时的解决方案是覆写 getRowNodeHeight 方法,可以参考下:
getRowNodeHeight
import { PivotFacet } from "@antv/s2"; export class PivotFacetSetter extends PivotFacet { constructor(spreadsheet) { super(spreadsheet); } // 自定义行头节点高度 getRowNodeHeight() { // ... return this.spreadsheet.options.style?.rowCell?.height || 30; } }
在 options 中:
options
const options = { facet: sheetType === 'pivot' ? (spreadsheet) => new PivotFacetSetter(spreadsheet) : null, }
Sorry, something went wrong.
这里是因为每一次重新布局都会重新绘制文本,计算行头的高度,我这边临时的解决方案是覆写 getRowNodeHeight 方法,可以参考下: import { PivotFacet } from "@antv/s2"; export class PivotFacetSetter extends PivotFacet { constructor(spreadsheet) { super(spreadsheet); } // 自定义行头节点高度 getRowNodeHeight() { // ... return this.spreadsheet.options.style?.rowCell?.height || 30; } } 在 options 中: const options = { facet: sheetType === 'pivot' ? (spreadsheet) => new PivotFacetSetter(spreadsheet) : null, }
好的,感谢大佬,我试试🙏
lijinke666
Successfully merging a pull request may close this issue.
🏷 Version
Sheet Type
🖋 Description
这里为什么要一下子处理所有单元格的宽高呢,在这里很容易直接内存oom;而且拖拽列头依然会执行到这块方法;内存持续飙升;
还有官网事例
⌨️ Code Snapshots
🔗 Reproduce Link
🤔 Steps to Reproduce
😊 Expected Behavior
期望能关注内存占用的问题
😅 Current Behavior
💻 System information
The text was updated successfully, but these errors were encountered: