[Bug] 配置customLayout.Group中的stroke会出现右侧无法看到边框
Version
1.5.2
Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/admiring-oskar-d5rx4k?file=%2Fsrc%2Findex.ts%3A45%2C17
Steps to Reproduce
官方示例也存在此问题
customLayout: (args) => {
const { table, row, col, rect } = args
const { height, width } = rect ?? table.getCellRect(col, row)
const container = new VTable.CustomLayout.Group({
height: height,
width: width,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: '#f5f5f5',
stroke: true,
})
return {
rootContainer: container,
renderDefault: false,
}
}
需要处理宽度才可以显示右侧边框
customLayout: (args) => {
const { table, row, col, rect } = args
const { height, width } = rect ?? table.getCellRect(col, row)
const container = new VTable.CustomLayout.Group({
height: height,
width: width - 1,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
background: '#f5f5f5',
stroke: true,
})
return {
rootContainer: container,
renderDefault: false,
}
}
Current Behavior
配置customLayout.Group中的stroke会出现右侧无法看到边框,需要当前宽度-1后才能看到
Expected Behavior
我不想重新处理宽度的计算
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
自定义布局的设计,只作用在单元格内的内容部分;如果要编辑边框,需要在theme或style里配置单元格的border,或者使用自定义样式customStyle实现
自定义布局的设计,只作用在单元格内的内容部分;如果要编辑边框,需要在theme或style里配置单元格的border,或者使用自定义样式customStyle实现
VTable.CustomLayout.Group中的属性stroke:true; 不就是为自定义布局的设置边框嘛?还特意去customStyle或主题中去设置?
自定义布局的设计,只作用在单元格内的内容部分;如果要编辑边框,需要在theme或style里配置单元格的border,或者使用自定义样式customStyle实现
VTable.CustomLayout.Group中的属性stroke:true; 不就是为自定义布局的设置边框嘛?还特意去customStyle或主题中去设置?
目前是这样的,现在的场景架构中custom只定义单元格内容部分,单元格边框部分属于上层节点;目前这个比较难改动,我们后面如果重构场景树结构的话,会考虑一下这部分的优化