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(space): 处理space空元素 #1009

Merged
merged 2 commits into from
Jun 30, 2022
Merged

feat(space): 处理space空元素 #1009

merged 2 commits into from
Jun 30, 2022

Conversation

zFitness
Copy link
Contributor

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

在从 antdesign 切换到 tdesign 的过程中,发现了 antd 的 Space 和 td的 Space 对空标签处理不一致,导致样式错误。后面我对比了其他主流的组件库,例如 semi 都会对空元素进行处理。
例如以下代码, antd 显示效果一样,而tdesign则不一样

  • 包裹空元素
const BaseSpace = () => (
  <Space>
    <>
      <Button>Button</Button>
      <Button>Button</Button>
    </>
      <Button>Button</Button>
  </Space>
);
  • 没有空元素
const BaseSpace = () => (
  <Space>
    <Button>Button</Button>
    <Button>Button</Button>
    <Button>Button</Button>
  </Space>
);

📝 更新日志

  • fix(组件名称): 处理问题或特性描述 ...

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@github-actions
Copy link
Contributor

github-actions bot commented Jun 30, 2022

完成

@codecov-commenter
Copy link

Codecov Report

Merging #1009 (2fc3ce3) into develop (7b04365) will increase coverage by 0.01%.
The diff coverage is 49.39%.

@@             Coverage Diff             @@
##           develop    #1009      +/-   ##
===========================================
+ Coverage    60.40%   60.42%   +0.01%     
===========================================
  Files          937      943       +6     
  Lines        16498    16555      +57     
  Branches      3743     3758      +15     
===========================================
+ Hits          9966    10003      +37     
- Misses        6532     6552      +20     
Impacted Files Coverage Δ
src/date-picker/DatePicker.tsx 16.21% <0.00%> (ø)
src/date-picker/DatePickerPanel.tsx 12.90% <0.00%> (ø)
src/date-picker/DateRangePicker.tsx 10.41% <0.00%> (ø)
src/date-picker/DateRangePickerPanel.tsx 10.37% <0.00%> (ø)
src/date-picker/base/Header.tsx 42.42% <ø> (ø)
src/date-picker/panel/PanelContent.tsx 70.58% <0.00%> (ø)
src/date-picker/panel/RangePanel.tsx 85.00% <ø> (ø)
src/date-picker/panel/SinglePanel.tsx 94.11% <ø> (ø)
src/jumper/_usage/index.jsx 0.00% <0.00%> (ø)
src/space/_usage/index.jsx 0.00% <ø> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a81177...2fc3ce3. Read the comment docs.

@honkinglin honkinglin merged commit 8c7296a into Tencent:develop Jun 30, 2022
This was referenced Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants