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

Enhance <Grid>&<Meta> props type definition #14857

Merged
merged 1 commit into from Feb 19, 2019
Merged

Enhance <Grid>&<Meta> props type definition #14857

merged 1 commit into from Feb 19, 2019

Conversation

@jas0ncn
Copy link
Contributor

@jas0ncn jas0ncn commented Feb 15, 2019

这个变动的性质是

  • TypeScript 定义更新

需求背景

<Grid> 组件没有定义 children 导致传入子组件报错:

image

请求合并前的自查清单

  • TypeScript 定义已补充或无须补充
@netlify
Copy link

@netlify netlify bot commented Feb 15, 2019

Deploy preview for ant-design ready!

Built with commit 6850c35

https://deploy-preview-14857--ant-design.netlify.com

@@ -6,6 +6,7 @@ export interface CardGridProps {
prefixCls?: string;
style?: React.CSSProperties;
className?: string;
children?: React.ReactNode;
}

export default (props: CardGridProps) => (
Copy link
Member

@yesmeck yesmeck Feb 15, 2019

其实下面这样更合适。

const Grid: React.SFC<CardGridProps> = (props) => (
  ...
)

export default Grid;

CardGridProps 里不需要写 children

Copy link
Contributor Author

@jas0ncn jas0ncn Feb 15, 2019

对哦,我来改一下

@yesmeck
Copy link
Member

@yesmeck yesmeck commented Feb 15, 2019

@@ -19,3 +18,5 @@ export default (props: CardGridProps) => (
}}
</ConfigConsumer>
);

export default Grid
Copy link
Member

@afc163 afc163 Feb 19, 2019

missing ;.

@@ -8,7 +8,7 @@ export interface CardGridProps {
className?: string;
}

export default (props: CardGridProps) => (
const Grid: React.SFC<CardGridProps> = (props: CardGridProps) => (
Copy link
Member

@yesmeck yesmeck Feb 19, 2019

(props) 就可以

@jas0ncn jas0ncn changed the title Fix Grid children type error Enhance <Grid>&<Meta> props type definition Feb 19, 2019
@afc163
Copy link
Member

@afc163 afc163 commented Feb 19, 2019

Try rebase master.

@jas0ncn
Copy link
Contributor Author

@jas0ncn jas0ncn commented Feb 19, 2019

Try rebase master.

rebase 会产生中间所有 commit 的变更,是否这样做?

@afc163
Copy link
Member

@afc163 afc163 commented Feb 19, 2019

你没 rebase 对。。

@codecov
Copy link

@codecov codecov bot commented Feb 19, 2019

Codecov Report

Merging #14857 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14857      +/-   ##
==========================================
+ Coverage   92.75%   92.79%   +0.03%     
==========================================
  Files         236      236              
  Lines        6226     6232       +6     
  Branches     1864     1851      -13     
==========================================
+ Hits         5775     5783       +8     
+ Misses        448      446       -2     
  Partials        3        3
Impacted Files Coverage Δ
components/steps/index.tsx 100% <ø> (ø) ⬆️
components/card/Grid.tsx 100% <100%> (ø) ⬆️
components/form/FormItem.tsx 96.47% <100%> (+0.1%) ⬆️
components/card/Meta.tsx 100% <100%> (ø) ⬆️
components/table/Table.tsx 92.94% <100%> (-0.02%) ⬇️
components/tabs/index.tsx 90.32% <0%> (-1.62%) ⬇️
components/_util/wave.tsx 87.5% <0%> (+2.88%) ⬆️

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 6dce9af...f07a8cc. Read the comment docs.

@codecov
Copy link

@codecov codecov bot commented Feb 19, 2019

Codecov Report

Merging #14857 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14857      +/-   ##
==========================================
+ Coverage   92.74%   92.74%   +<.01%     
==========================================
  Files         236      236              
  Lines        6230     6232       +2     
  Branches     1834     1834              
==========================================
+ Hits         5778     5780       +2     
  Misses        451      451              
  Partials        1        1
Impacted Files Coverage Δ
components/card/Meta.tsx 100% <100%> (ø) ⬆️
components/card/Grid.tsx 100% <100%> (ø) ⬆️

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 eddfbd5...6850c35. Read the comment docs.

@jas0ncn
Copy link
Contributor Author

@jas0ncn jas0ncn commented Feb 19, 2019

哦哦。搞错了。现在好了🤣

@zombieJ zombieJ merged commit 4c5f3d2 into ant-design:master Feb 19, 2019
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants