Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

feat: DatePicker #49

Merged
merged 7 commits into from
Aug 20, 2019
Merged

feat: DatePicker #49

merged 7 commits into from
Aug 20, 2019

Conversation

wangkailang
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@51cef8a). Click here to learn what that means.
The diff coverage is 97.56%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #49   +/-   ##
=========================================
  Coverage          ?   87.21%           
=========================================
  Files             ?       15           
  Lines             ?      446           
  Branches          ?      109           
=========================================
  Hits              ?      389           
  Misses            ?       56           
  Partials          ?        1
Impacted Files Coverage Δ
src/components/DatePicker/index.tsx 97.56% <97.56%> (ø)

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 51cef8a...ed93306. Read the comment docs.

@netlify
Copy link

netlify bot commented Aug 14, 2019

Deploy preview for wizard-ui ready!

Built with commit ed93306

https://deploy-preview-49--wizard-ui.netlify.com

…icker

* 'master' of github.com:xsky-fe/wizard-ui:
  feat: Add Dropdown component. (#47)

# Conflicts:
#	src/interface.tsx
import { DatePickerProps } from '../../interface';
import './style.scss';

const format: string = 'YYYY-MM-DD HH:mm:ss';
Copy link
Contributor

Choose a reason for hiding this comment

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

如果右边的 value 可以直接推断出类型,左侧可以不用指定


const format: string = 'YYYY-MM-DD HH:mm:ss';

function getFormat(time: boolean | undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

参数可以使用 time?: boolean 代替

getTime: PropTypes.func,
};

DatePicker.defaultProps = {
Copy link
Contributor

Choose a reason for hiding this comment

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

可以把 defaultProps 类型单独定义出来,在这里显式指定,避免属性拼写或其他错误

@wangkailang wangkailang added changes Code Need Change 3-Changed Code has Changed labels Aug 15, 2019
};

DatePicker.defaultProps = {
disabled: false,
showTime: true,
};
} as DatePickerDefaultProps;
Copy link
Contributor

Choose a reason for hiding this comment

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

as 就做不到检查了,可以先定义 defaultProps 再赋值

const defaultProps: DatePickerDefaultProps = {
  ...
}
DatePicker.defaultProps = defaultProps;

…icker

* 'master' of github.com:xsky-fe/wizard-ui:
  fix: Rename well component. (#54)
  fix: Component in docs ignore error (#55)
  feat: Add Navbar. (#53)

# Conflicts:
#	src/components/index.tsx
@lijianxin1202 lijianxin1202 added the 4-Approved Code PR approved label Aug 19, 2019
@wangkailang wangkailang merged commit df9d2a0 into master Aug 20, 2019
@wangkailang wangkailang deleted the feat/DatePicker branch August 20, 2019 03:40
wangkailang added a commit that referenced this pull request Aug 26, 2019
…alList

* 'master' of github.com:xsky-fe/wizard-ui:
  feat: Add grid. (#58)
  Feat: add alert (#52)
  Release 0.1.0
  Feat: Add Font specification (#51)
  feat: DatePicker (#49)

# Conflicts:
#	src/components/index.tsx
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1-Review Code review 3-Changed Code has Changed 4-Approved Code PR approved changes Code Need Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants