scrollType
描述
可选。定义滚动类型
用法
scrollType?: "default" | "column";
注释
如果您使用 scrollType: "column" 设置,则可以分别滚动每一列。
默认配置
scrollType: "default"
important
如果您将 renderType: "lazy" 和 scrollType: "default" 设置结合使用,请务必通过 cardHeight 属性指定卡片的固定高度。否则卡片将无法显示。
当您将 renderType: "lazy" 与 scrollType: "column" 一起使用时,也应该通过 cardHeight 属性固定卡片的高度。尽管该布局类型支持可变高度的卡片,但如果卡片内容为自定义内容,显示效果可能不稳定。
如果未设置 cardHeight,组件将根据 cardShape 对卡片高度进行实验性估算作为回退。对于使用自定义 cardTemplate 的看板,请改为提供自定义的 getCardHeight 函数。
示例
new kanban.Kanban("#root", {
columns,
cards,
rows,
scrollType: "column",
// 其他参数
});
更新日志: 该属性在 v1.2 版本中添加
相关文档: 配置
相关示例: 看板。固定表头、懒加载渲染和列滚动