Skip to content
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: 明细表新增空数据占位符能力 #2729

Merged
merged 12 commits into from
May 17, 2024
Merged

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented May 16, 2024

👀 PR includes

✨ Feature

  • New feature

📝 Description

TODO:

  1. 新增明细表空数据占位符功能, 支持配置图标和文本 (Canvas), 效果参考 https://ant-design.antgroup.com/components/empty-cn 组件
  2. 修复横向滚动条展示在表格外部的问题

BREAKING CHANGE: s2Options.placeholder 配置更改为 cell 和 empty

const s2Options = {
- placeholder: "-",
+ placeholder: {
+   cell: '-'
+ }
}
const s2Options = {
+ placeholder: {
+   empty: {
+     icon: 'Empty',
+     description: '暂无数据'
+   }
+ }
}

🖼️ Screenshot

Before After
image image
image image

🔗 Related issue link

close #1946

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

BREAKING CHANGE: s2Options.placeholder 配置更改为 cell 和 empty
Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 🛑 Canceled (Inspect) May 17, 2024 9:59am

Copy link
Contributor

github-actions bot commented May 16, 2024

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label May 16, 2024
Copy link
Contributor

github-actions bot commented May 16, 2024

Size Change: +880 B (+0.28%)

Total Size: 321 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 224 kB +883 B (+0.4%)
./packages/s2-react/dist/index.min.js 69.4 kB -3 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 402 B
./packages/s2-react/dist/style.min.css 3.92 kB
./packages/s2-vue/dist/index.min.js 21 kB
./packages/s2-vue/dist/style.min.css 1.99 kB

compressed-size-action

@lijinke666 lijinke666 changed the title feat: 明细表新增空数据占位符能力 [WIP] feat: 明细表新增空数据占位符能力 May 16, 2024
@github-actions github-actions bot removed the pr(feature) new feature label May 16, 2024
@lijinke666 lijinke666 changed the title [WIP] feat: 明细表新增空数据占位符能力 feat: 明细表新增空数据占位符能力 May 17, 2024
@github-actions github-actions bot added the pr(feature) new feature label May 17, 2024
@@ -1029,9 +1031,9 @@ export abstract class BaseFacet {

return {
maxX: (isContentMode ? maxX : width) - this.scrollBarSize,
maxY: isContentMode ? maxY : height - this.scrollBarSize,
maxY: (isContentMode ? maxY : height) - this.scrollBarSize,
Copy link
Member Author

@lijinke666 lijinke666 May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是忘记写括号了, 会导致滚动条在容器外面

image

@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label May 17, 2024
@lijinke666 lijinke666 merged commit 19dbda5 into next May 17, 2024
8 of 9 checks passed
@lijinke666 lijinke666 deleted the feat-empty-placehoder branch May 17, 2024 09:57
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-react-v2.0.0-next.20 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(feature) new feature released on @next
Projects
None yet
2 participants