-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
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
feat: 暴露afterRealCellRender,这样能够更灵活的使用datacell #1970
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportBase: 77.16% // Head: 76.79% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1970 +/- ##
==========================================
- Coverage 77.16% 76.79% -0.38%
==========================================
Files 234 239 +5
Lines 11518 12094 +576
Branches 2449 2570 +121
==========================================
+ Hits 8888 9287 +399
- Misses 1258 1349 +91
- Partials 1372 1458 +86
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
你好 @wind108369,感谢你的贡献, 为了让代码更健壮, 请补充相应单元测试, 如果有 API 改动, 请修改 相应的文档 Hello, @wind108369, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes. |
ee7aa33
to
b0fdc7e
Compare
b0fdc7e
to
ccfd146
Compare
ccfd146
to
90651d3
Compare
测试挂了 |
90651d3
to
f67ac7b
Compare
之前的单测里面buildFacet被mock了 |
能贴一下增加这个hook后,你那边如何使用的代码吗?看截图你似乎想想合并一个单元格,目前已经有一个
|
是的,目前的主要是为了实现合并单元格,在钉钉群里面得到的信息是明细表不支持,如果有一个支持的方案就可以不用这么处理;从另外的角度,增加这个hook就可以灵活的设置单元格的边框 |
mergedCell 只支持 dataCell, 他这里加一个 hook 也没啥毛病 |
f67ac7b
to
572c0d2
Compare
572c0d2
to
68051c8
Compare
感谢您的贡献 |
🎉 This PR is included in version @antv/s2-v1.37.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v1.34.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-vue-v1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-v1.37.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v1.34.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-vue-v1.5.0-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* docs: 修复错误 API 文档格式 (#1976) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 (#1984) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 * test: 添加单测 Co-authored-by: zishang <[email protected]> * feat: 暴露afterRealCellRender,这样能够更灵活的使用datacell (#1970) Co-authored-by: 杨骥 <[email protected]> * feat: 实现树状模式下可复制 (#1986) * feat: 树状结构下复制,非叶子节点也需要被复制到 * fix: 修复存在空数据时复制错误的问题 * test: 添加树状结构下复制的单测 * chore: 删除无用代码 * chore: 删除无用代码 Co-authored-by: zishang <[email protected]> * feat: 适配链接跳转的判断方式 (#1983) * fix: 适配链接跳转的判断方式 * fix: 增加点击链接返回参数 id * test: 完善链接跳转测试 * fix: 透传整个cellData * docs: 补充链接跳转文档 * test: 修复链接跳转单测 * test: 修复链接跳转单测 Co-authored-by: gaofuhong.gfh <[email protected]> * chore: 🤖 更新 changelog 文件 (#1989) * feat: 增加 linkFields 参数传入类型 (#1992) * feat: 增加 linkFields 参数传入类型 * docs: 补充 linkFields 文档 * docs: 补充 linkFields 文档 * fix: 抽取判断是否需要添加链接为公共方法 * fix: 修改公共方法名 Co-authored-by: gaofuhong.gfh <[email protected]> * refactor: 优化智能反色功能 (#1974) * feat: 优化智能反色需求 * feat: 优化智能反色需求 Co-authored-by: zishang <[email protected]> * docs: 官网自定义目录树链接跳转 demo (#2001) feat: 官网自定义目录树链接跳转 demo Co-authored-by: gaofuhong.gfh <[email protected]> * fix: gui icon 加载完成后,增加检测步骤,避免无意义的渲染 warning (#1997) * docs: 更新列分组demo配图 (#1998) * docs: 修复自定义 schema 示例demo (#2000) * feat: 添加字段标记中,定制柱状图的长度的功能 (filedValue) (#2002) * feat: 添加字段标记中,定制柱状图的长度的功能 * chore: 添加字段标记中,定制柱状图的长度的demo * test: 添加字段标记中,定制柱状图的长度的单测 Co-authored-by: zishang <[email protected]> * fix: 明细表紧凑模式宽度计算错误 (#2006) * fix: 明细表紧凑模式宽度计算错误 * test: 补充紧凑模式测试用例 * test: table-facet测试异常 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2005) * fix: 明细表linkField失效 (#2007) * fix: 明细表linkField失效 * test: 补充测试用例 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2008) * feat: 子弹图为空时使用placeholder占位 (#2010) Co-authored-by: 沫君 <[email protected]> * fix: 列头label存在数组,复制导出列头层级补齐错误 (#1990) * fix: 列头label存在数组,层级补齐错误 当headers存在数组,但不是每一列都存在数组时,仅需要对header[0]为数组的项进行补齐(当列各层级都是string类型时会补齐过多的空格) * test: 添加单测 * feat: selected cell highlight (#1878) * feat: upgrade selectedCellHighlight option & 修复 selectedCellHighlight 单元格因滚动状态失效的问题 * feat: selectedCellHighlight option 复制功能 * fix: selectedCellHighlight 为 false 的情况 * fix: 修复单测报错 * feat: 补充单测 * feat: selectedCellHighlight 配置项补充文档 * refactor: 调整 BaseDataSet.getRowData 为抽象方法 * refactor: remove unused code * refactor: 调整 selectedCellHighlight option 实现逻辑 * feat: 修改文档 & react playground * refactor: 调整 selectedCellHighlight option 复制实现 * feat: 调整单测 * fix: type error * refactor: selectedCellHighlight option 调整数据单元格点击事件 headerCells 存储逻辑 * feat: selectedCellHighlight option 统一刷选的交互 & afterSelectDataCells 函数提取 * refactor: remove duplicate constant * refactor: selectedCellHighlight option selectedCellHighlightAdaptor 调整为 getSelectedCellHighlight * fix: lint error * fix: unit test Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: stone <[email protected]> * fix: bullet占位符绘制错误 (#2022) Co-authored-by: 沫君 <[email protected]> * fix: 修复单元格宽高为0时的无意义渲染 (#2024) * fix: 修复单元格宽高为0时的无意义渲染 * fix: 修复 facet 处理过程中忽略 0 的情况 * test: 修复单测 * test: 添加宽高为 0 时的单元格测试 * refactor: 在 base cell 中应用 shouldInit * fix : 修复点击行列头无法整行高亮的问题 (#2025) * fix: 修复点击行列头无法整行高亮的问题 * test: 添加修复点击行列头无法整行高亮的问题的单测 * docs: 完善 selectedCellHighlight 相关文档 * docs: 完善 selectedCellHighlight 相关文档 Co-authored-by: zishang <[email protected]> * docs: 替换antgroup主站 (#2029) Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2028) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 (#2026) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 * test: 修复测试 * refactor: rowCells 重命名为 currentRow,避免与行头 rowCell 定义冲突 (#2032) Co-authored-by: zishang <[email protected]> * chore: 修复严格模式下 eslint 错误的问题 Co-authored-by: Jinke Li <[email protected]> Co-authored-by: zishang <[email protected]> Co-authored-by: yangji <[email protected]> Co-authored-by: 杨骥 <[email protected]> Co-authored-by: GaoFuhong <[email protected]> Co-authored-by: gaofuhong.gfh <[email protected]> Co-authored-by: Wenjun Xu <[email protected]> Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: 刘嘉一 <[email protected]> Co-authored-by: 沫君 <[email protected]> Co-authored-by: 照明胧 <[email protected]> Co-authored-by: LHC8888 <[email protected]>
* docs: 修复错误 API 文档格式 (#1976) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 (#1984) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 * test: 添加单测 Co-authored-by: zishang <[email protected]> * feat: 暴露afterRealCellRender,这样能够更灵活的使用datacell (#1970) Co-authored-by: 杨骥 <[email protected]> * feat: 实现树状模式下可复制 (#1986) * feat: 树状结构下复制,非叶子节点也需要被复制到 * fix: 修复存在空数据时复制错误的问题 * test: 添加树状结构下复制的单测 * chore: 删除无用代码 * chore: 删除无用代码 Co-authored-by: zishang <[email protected]> * feat: 适配链接跳转的判断方式 (#1983) * fix: 适配链接跳转的判断方式 * fix: 增加点击链接返回参数 id * test: 完善链接跳转测试 * fix: 透传整个cellData * docs: 补充链接跳转文档 * test: 修复链接跳转单测 * test: 修复链接跳转单测 Co-authored-by: gaofuhong.gfh <[email protected]> * chore: 🤖 更新 changelog 文件 (#1989) * feat: 增加 linkFields 参数传入类型 (#1992) * feat: 增加 linkFields 参数传入类型 * docs: 补充 linkFields 文档 * docs: 补充 linkFields 文档 * fix: 抽取判断是否需要添加链接为公共方法 * fix: 修改公共方法名 Co-authored-by: gaofuhong.gfh <[email protected]> * refactor: 优化智能反色功能 (#1974) * feat: 优化智能反色需求 * feat: 优化智能反色需求 Co-authored-by: zishang <[email protected]> * docs: 官网自定义目录树链接跳转 demo (#2001) feat: 官网自定义目录树链接跳转 demo Co-authored-by: gaofuhong.gfh <[email protected]> * fix: gui icon 加载完成后,增加检测步骤,避免无意义的渲染 warning (#1997) * docs: 更新列分组demo配图 (#1998) * docs: 修复自定义 schema 示例demo (#2000) * feat: 添加字段标记中,定制柱状图的长度的功能 (filedValue) (#2002) * feat: 添加字段标记中,定制柱状图的长度的功能 * chore: 添加字段标记中,定制柱状图的长度的demo * test: 添加字段标记中,定制柱状图的长度的单测 Co-authored-by: zishang <[email protected]> * fix: 明细表紧凑模式宽度计算错误 (#2006) * fix: 明细表紧凑模式宽度计算错误 * test: 补充紧凑模式测试用例 * test: table-facet测试异常 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2005) * fix: 明细表linkField失效 (#2007) * fix: 明细表linkField失效 * test: 补充测试用例 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2008) * feat: 子弹图为空时使用placeholder占位 (#2010) Co-authored-by: 沫君 <[email protected]> * fix: 列头label存在数组,复制导出列头层级补齐错误 (#1990) * fix: 列头label存在数组,层级补齐错误 当headers存在数组,但不是每一列都存在数组时,仅需要对header[0]为数组的项进行补齐(当列各层级都是string类型时会补齐过多的空格) * test: 添加单测 * feat: selected cell highlight (#1878) * feat: upgrade selectedCellHighlight option & 修复 selectedCellHighlight 单元格因滚动状态失效的问题 * feat: selectedCellHighlight option 复制功能 * fix: selectedCellHighlight 为 false 的情况 * fix: 修复单测报错 * feat: 补充单测 * feat: selectedCellHighlight 配置项补充文档 * refactor: 调整 BaseDataSet.getRowData 为抽象方法 * refactor: remove unused code * refactor: 调整 selectedCellHighlight option 实现逻辑 * feat: 修改文档 & react playground * refactor: 调整 selectedCellHighlight option 复制实现 * feat: 调整单测 * fix: type error * refactor: selectedCellHighlight option 调整数据单元格点击事件 headerCells 存储逻辑 * feat: selectedCellHighlight option 统一刷选的交互 & afterSelectDataCells 函数提取 * refactor: remove duplicate constant * refactor: selectedCellHighlight option selectedCellHighlightAdaptor 调整为 getSelectedCellHighlight * fix: lint error * fix: unit test Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: stone <[email protected]> * fix: bullet占位符绘制错误 (#2022) Co-authored-by: 沫君 <[email protected]> * fix: 修复单元格宽高为0时的无意义渲染 (#2024) * fix: 修复单元格宽高为0时的无意义渲染 * fix: 修复 facet 处理过程中忽略 0 的情况 * test: 修复单测 * test: 添加宽高为 0 时的单元格测试 * refactor: 在 base cell 中应用 shouldInit * fix : 修复点击行列头无法整行高亮的问题 (#2025) * fix: 修复点击行列头无法整行高亮的问题 * test: 添加修复点击行列头无法整行高亮的问题的单测 * docs: 完善 selectedCellHighlight 相关文档 * docs: 完善 selectedCellHighlight 相关文档 Co-authored-by: zishang <[email protected]> * docs: 替换antgroup主站 (#2029) Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2028) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 (#2026) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 * test: 修复测试 * refactor: rowCells 重命名为 currentRow,避免与行头 rowCell 定义冲突 (#2032) Co-authored-by: zishang <[email protected]> * chore: 修复严格模式下 eslint 错误的问题 * test: 修复linkField测试 * chore: 修复 lint 问题 * test: 修复 cornerBBox 单测问题 * test: 修复 link jump 单测 * test: table-sheet 单测 * fix: 明细表列头clip错误 * chore: compressed action 优化 * fix: 修复列头隐藏时角头不显示 * test: g-mini-charts 单测文字处理 * test: 修复 next 版本,不将 border width 作为 Interval 宽度。 * test: 更新 corner 单测 * fix: 明细表compact模式宽度计算错误 * test: 修改单测,添加border width Co-authored-by: Jinke Li <[email protected]> Co-authored-by: zishang <[email protected]> Co-authored-by: yangji <[email protected]> Co-authored-by: 杨骥 <[email protected]> Co-authored-by: GaoFuhong <[email protected]> Co-authored-by: gaofuhong.gfh <[email protected]> Co-authored-by: Wenjun Xu <[email protected]> Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: 刘嘉一 <[email protected]> Co-authored-by: 沫君 <[email protected]> Co-authored-by: 照明胧 <[email protected]> Co-authored-by: LHC8888 <[email protected]>
🎉 This PR is included in version @antv/s2-v2.0.0-next.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.0.0-next.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-vue-v2.0.0-next.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* docs: 修复错误 API 文档格式 (#1976) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 (#1984) * fix: 修复 enableCopy 和 hideMeasureColumn 都开启为 true 时,复制报错问题 * test: 添加单测 Co-authored-by: zishang <[email protected]> * feat: 暴露afterRealCellRender,这样能够更灵活的使用datacell (#1970) Co-authored-by: 杨骥 <[email protected]> * feat: 实现树状模式下可复制 (#1986) * feat: 树状结构下复制,非叶子节点也需要被复制到 * fix: 修复存在空数据时复制错误的问题 * test: 添加树状结构下复制的单测 * chore: 删除无用代码 * chore: 删除无用代码 Co-authored-by: zishang <[email protected]> * feat: 适配链接跳转的判断方式 (#1983) * fix: 适配链接跳转的判断方式 * fix: 增加点击链接返回参数 id * test: 完善链接跳转测试 * fix: 透传整个cellData * docs: 补充链接跳转文档 * test: 修复链接跳转单测 * test: 修复链接跳转单测 Co-authored-by: gaofuhong.gfh <[email protected]> * chore: 🤖 更新 changelog 文件 (#1989) * feat: 增加 linkFields 参数传入类型 (#1992) * feat: 增加 linkFields 参数传入类型 * docs: 补充 linkFields 文档 * docs: 补充 linkFields 文档 * fix: 抽取判断是否需要添加链接为公共方法 * fix: 修改公共方法名 Co-authored-by: gaofuhong.gfh <[email protected]> * refactor: 优化智能反色功能 (#1974) * feat: 优化智能反色需求 * feat: 优化智能反色需求 Co-authored-by: zishang <[email protected]> * docs: 官网自定义目录树链接跳转 demo (#2001) feat: 官网自定义目录树链接跳转 demo Co-authored-by: gaofuhong.gfh <[email protected]> * fix: gui icon 加载完成后,增加检测步骤,避免无意义的渲染 warning (#1997) * docs: 更新列分组demo配图 (#1998) * docs: 修复自定义 schema 示例demo (#2000) * feat: 添加字段标记中,定制柱状图的长度的功能 (filedValue) (#2002) * feat: 添加字段标记中,定制柱状图的长度的功能 * chore: 添加字段标记中,定制柱状图的长度的demo * test: 添加字段标记中,定制柱状图的长度的单测 Co-authored-by: zishang <[email protected]> * fix: 明细表紧凑模式宽度计算错误 (#2006) * fix: 明细表紧凑模式宽度计算错误 * test: 补充紧凑模式测试用例 * test: table-facet测试异常 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2005) * fix: 明细表linkField失效 (#2007) * fix: 明细表linkField失效 * test: 补充测试用例 Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2008) * feat: 子弹图为空时使用placeholder占位 (#2010) Co-authored-by: 沫君 <[email protected]> * fix: 列头label存在数组,复制导出列头层级补齐错误 (#1990) * fix: 列头label存在数组,层级补齐错误 当headers存在数组,但不是每一列都存在数组时,仅需要对header[0]为数组的项进行补齐(当列各层级都是string类型时会补齐过多的空格) * test: 添加单测 * feat: selected cell highlight (#1878) * feat: upgrade selectedCellHighlight option & 修复 selectedCellHighlight 单元格因滚动状态失效的问题 * feat: selectedCellHighlight option 复制功能 * fix: selectedCellHighlight 为 false 的情况 * fix: 修复单测报错 * feat: 补充单测 * feat: selectedCellHighlight 配置项补充文档 * refactor: 调整 BaseDataSet.getRowData 为抽象方法 * refactor: remove unused code * refactor: 调整 selectedCellHighlight option 实现逻辑 * feat: 修改文档 & react playground * refactor: 调整 selectedCellHighlight option 复制实现 * feat: 调整单测 * fix: type error * refactor: selectedCellHighlight option 调整数据单元格点击事件 headerCells 存储逻辑 * feat: selectedCellHighlight option 统一刷选的交互 & afterSelectDataCells 函数提取 * refactor: remove duplicate constant * refactor: selectedCellHighlight option selectedCellHighlightAdaptor 调整为 getSelectedCellHighlight * fix: lint error * fix: unit test Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: stone <[email protected]> * fix: bullet占位符绘制错误 (#2022) Co-authored-by: 沫君 <[email protected]> * fix: 修复单元格宽高为0时的无意义渲染 (#2024) * fix: 修复单元格宽高为0时的无意义渲染 * fix: 修复 facet 处理过程中忽略 0 的情况 * test: 修复单测 * test: 添加宽高为 0 时的单元格测试 * refactor: 在 base cell 中应用 shouldInit * fix : 修复点击行列头无法整行高亮的问题 (#2025) * fix: 修复点击行列头无法整行高亮的问题 * test: 添加修复点击行列头无法整行高亮的问题的单测 * docs: 完善 selectedCellHighlight 相关文档 * docs: 完善 selectedCellHighlight 相关文档 Co-authored-by: zishang <[email protected]> * docs: 替换antgroup主站 (#2029) Co-authored-by: 沫君 <[email protected]> * chore: 🤖 更新 changelog 文件 (#2028) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 (#2026) * fix(layout): 修复无列头时行头对应的角头不显示 close #1929 * test: 修复测试 * refactor: rowCells 重命名为 currentRow,避免与行头 rowCell 定义冲突 (#2032) Co-authored-by: zishang <[email protected]> * chore: 修复严格模式下 eslint 错误的问题 * test: 修复linkField测试 * chore: 修复 lint 问题 * test: 修复 cornerBBox 单测问题 * test: 修复 link jump 单测 * test: table-sheet 单测 * fix: 明细表列头clip错误 * chore: compressed action 优化 * fix: 修复列头隐藏时角头不显示 * test: g-mini-charts 单测文字处理 * refactor: 移除所有 @deprecated api * test: 修复 next 版本,不将 border width 作为 Interval 宽度。 * test: 更新 corner 单测 * test: 单测修复 * test: react 单测修复 Co-authored-by: Jinke Li <[email protected]> Co-authored-by: stone <[email protected]> Co-authored-by: zishang <[email protected]> Co-authored-by: yangji <[email protected]> Co-authored-by: 杨骥 <[email protected]> Co-authored-by: GaoFuhong <[email protected]> Co-authored-by: gaofuhong.gfh <[email protected]> Co-authored-by: 嘤嘤嘤 <[email protected]> Co-authored-by: 刘嘉一 <[email protected]> Co-authored-by: 沫君 <[email protected]> Co-authored-by: 照明胧 <[email protected]> Co-authored-by: LHC8888 <[email protected]> Co-authored-by: stone <[email protected]>
Co-authored-by: 杨骥 <[email protected]>
👀 PR includes
✨ Feature
New feature
目前datacell可以通过修改主题能够实现部分样式的定制化,但是因为spreadsheet.theme是公用的,导致datacell之后不能回复到初始状态,增加一个afterRealCellRender方法,可以更灵活。
目前dataCell的边框自己不会绘制,是updateGrid中绘制的,导致无法实现合并单元格的情况,如下图
增加上述逻辑就能实现
🎨 Enhance
🐛 Bugfix
🔧 Chore
📝 Description
🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge