Skip to content

style(Table): Add the rowScope style#40304

Merged
MadCcc merged 3 commits intoant-design:masterfrom
Yuiai01:fix
Mar 2, 2023
Merged

style(Table): Add the rowScope style#40304
MadCcc merged 3 commits intoant-design:masterfrom
Yuiai01:fix

Conversation

@Yuiai01
Copy link
Copy Markdown
Contributor

@Yuiai01 Yuiai01 commented Jan 18, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #40297
close #39688

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Add rowScope style for table
🇨🇳 Chinese 增加 table 中 rowScope 的样式

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 18, 2023

@Yuiai01
Copy link
Copy Markdown
Contributor Author

Yuiai01 commented Jan 18, 2023

为了更加符合行表头,我将右边竖线,以及默认的 text-align: start 去除了,不知道这样行不行,如图:
image

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 18, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5bdc15e) 100.00% compared to head (a9d00cc) 100.00%.

❗ Current head a9d00cc differs from pull request most recent head 4204544. Consider uploading reports for the commit 4204544 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #40304   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          606       606           
  Lines        10291     10287    -4     
  Branches      2790      2789    -1     
=========================================
- Hits         10291     10287    -4     
Impacted Files Coverage Δ
components/table/style/bordered.ts 100.00% <ø> (ø)
components/table/style/empty.ts 100.00% <ø> (ø)
components/table/style/expand.ts 100.00% <ø> (ø)
components/table/style/index.ts 100.00% <ø> (ø)
components/table/style/size.ts 100.00% <ø> (ø)
components/affix/utils.ts 100.00% <0.00%> (ø)
components/tour/index.tsx 100.00% <0.00%> (ø)
components/empty/index.tsx 100.00% <0.00%> (ø)
components/locale/vi_VN.ts 100.00% <0.00%> (ø)
components/modal/Modal.tsx 100.00% <0.00%> (ø)
... and 40 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MadCcc
Copy link
Copy Markdown
Member

MadCcc commented Jan 18, 2023

错位了

@Yuiai01
Copy link
Copy Markdown
Contributor Author

Yuiai01 commented Jan 18, 2023

错位了

我再试试,大佬能大概指一下吗

@Yuiai01
Copy link
Copy Markdown
Contributor Author

Yuiai01 commented Jan 21, 2023

现在的样式是酱紫的:
image

@MadCcc
Copy link
Copy Markdown
Member

MadCcc commented Jan 31, 2023

Closing since style has been reverted: #40469

@MadCcc MadCcc closed this Jan 31, 2023
@afc163 afc163 reopened this Feb 9, 2023
@afc163
Copy link
Copy Markdown
Member

afc163 commented Feb 9, 2023

@Yuiai01 这个还得加,现在样式还是有问题 https://codesandbox.io/s/demo-of-rowscope-forked-m7x1xy?file=/package.json

@afc163
Copy link
Copy Markdown
Member

afc163 commented Feb 9, 2023

搞好了,#40271 也能合掉。 cc @MuxinFeng

@Yuiai01
Copy link
Copy Markdown
Contributor Author

Yuiai01 commented Feb 9, 2023

@Yuiai01 这个还得加,现在样式还是有问题 https://codesandbox.io/s/demo-of-rowscope-forked-m7x1xy?file=/package.json

好的大佬,那我基于现在的样式加一下

},

'> th': {
textAlign: 'start',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这里覆盖掉 th 默认的 text-align: center 是由于表头默认左对齐,当列宽很大时,就会出现很诡异的一幕,如下图:
image

@MadCcc
Copy link
Copy Markdown
Member

MadCcc commented Mar 1, 2023

最好把 demo 合进来,CR 有点困难。

@MuxinFeng
Copy link
Copy Markdown
Contributor

demo 的 pr 提到你的分支啦,求看看~ @Yuiai01

@MadCcc MadCcc merged commit a268fdd into ant-design:master Mar 2, 2023
@MadCcc MadCcc mentioned this pull request Mar 5, 2023
20 tasks
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 4, 2023
* Add the rowScope style

* doc(table): add demo about rowScope

* update snapshot

---------

Co-authored-by: Yuiai01 <dujiaqi@kezaihui.com>
Co-authored-by: muxinFeng <434980373@qq.com>
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* Add the rowScope style

* doc(table): add demo about rowScope

* update snapshot

---------

Co-authored-by: Yuiai01 <dujiaqi@kezaihui.com>
Co-authored-by: muxinFeng <434980373@qq.com>
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* Add the rowScope style

* doc(table): add demo about rowScope

* update snapshot

---------

Co-authored-by: Yuiai01 <dujiaqi@kezaihui.com>
Co-authored-by: muxinFeng <434980373@qq.com>
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.

table 组件的 rowScope 属性会造成一些样式问题,目前发现的是 border 消失 补充 Table rowScope 用法 demo

4 participants