Merge branch 'master' of github.com:ant-design/ant-design

This commit is contained in:
afc163 2016-12-21 11:45:39 +08:00
commit 07c39529bb
5 changed files with 59 additions and 53 deletions

View File

@ -59,6 +59,7 @@ export interface CascaderProps {
onPopupVisibleChange?: (popupVisible: boolean) => void;
prefixCls?: string;
inputPrefixCls?: string;
getPopupContainer?: (triggerNode: Element) => HTMLElement;
}
function highlightKeyword(str: string, keyword: string, prefixCls: string) {

View File

@ -60,7 +60,7 @@ const RegistrationForm = Form.create()(React.createClass({
const value = e.target.value;
this.setState({ passwordDirty: this.state.passwordDirty || !!value });
},
checkPassowrd(rule, value, callback) {
checkPassword(rule, value, callback) {
const form = this.props.form;
if (value && value !== form.getFieldValue('password')) {
callback('Two passwords that you enter is inconsistent!');
@ -135,7 +135,7 @@ const RegistrationForm = Form.create()(React.createClass({
rules: [{
required: true, message: 'Please confirm your password!',
}, {
validator: this.checkPassowrd,
validator: this.checkPassword,
}],
})(
<Input type="password" />

View File

@ -22,7 +22,7 @@ export interface AbstractTooltipProps {
trigger?: 'hover' | 'focus' | 'click';
openClassName?: string;
arrowPointAtCenter?: boolean;
getTooltipContainer?: (triggerNode: React.ReactNode) => HTMLElement;
getTooltipContainer?: (triggerNode: Element) => HTMLElement;
children?: React.ReactElement<any>;
}

View File

@ -0,0 +1,53 @@
exports[`antd dist files exports modules correctly 1`] = `
Array [
"Affix",
"Anchor",
"AutoComplete",
"Alert",
"BackTop",
"Badge",
"Breadcrumb",
"Button",
"Calendar",
"Card",
"Collapse",
"Carousel",
"Cascader",
"Checkbox",
"Col",
"DatePicker",
"Dropdown",
"Form",
"Icon",
"Input",
"InputNumber",
"LocaleProvider",
"message",
"Menu",
"Modal",
"notification",
"Pagination",
"Popconfirm",
"Popover",
"Progress",
"Radio",
"Rate",
"Row",
"Select",
"Slider",
"Spin",
"Steps",
"Switch",
"Table",
"Transfer",
"Tree",
"TreeSelect",
"Tabs",
"Tag",
"TimePicker",
"Timeline",
"Tooltip",
"Mention",
"Upload",
]
`;

View File

@ -13,56 +13,8 @@ describe('antd dist files', () => {
// https://github.com/ant-design/ant-design/issues/1638
// https://github.com/ant-design/ant-design/issues/1968
it('should has modules in antd', () => {
expect('Affix' in antd).toBeTruthy();
expect('Alert' in antd).toBeTruthy();
expect('Anchor' in antd).toBeTruthy();
expect('AutoComplete' in antd).toBeTruthy();
expect('BackTop' in antd).toBeTruthy();
expect('Badge' in antd).toBeTruthy();
expect('Breadcrumb' in antd).toBeTruthy();
expect('Button' in antd).toBeTruthy();
expect('Calendar' in antd).toBeTruthy();
expect('Card' in antd).toBeTruthy();
expect('Carousel' in antd).toBeTruthy();
expect('Cascader' in antd).toBeTruthy();
expect('Checkbox' in antd).toBeTruthy();
expect('Col' in antd).toBeTruthy();
expect('Collapse' in antd).toBeTruthy();
expect('DatePicker' in antd).toBeTruthy();
expect('Dropdown' in antd).toBeTruthy();
expect('Form' in antd).toBeTruthy();
expect('Icon' in antd).toBeTruthy();
expect('Input' in antd).toBeTruthy();
expect('InputNumber' in antd).toBeTruthy();
expect('LocaleProvider' in antd).toBeTruthy();
expect('Menu' in antd).toBeTruthy();
expect('message' in antd).toBeTruthy();
expect('Modal' in antd).toBeTruthy();
expect('Mention' in antd).toBeTruthy();
expect('notification' in antd).toBeTruthy();
expect('Pagination' in antd).toBeTruthy();
expect('Popconfirm' in antd).toBeTruthy();
expect('Popover' in antd).toBeTruthy();
expect('Progress' in antd).toBeTruthy();
expect('Radio' in antd).toBeTruthy();
expect('Rate' in antd).toBeTruthy();
expect('Row' in antd).toBeTruthy();
expect('Select' in antd).toBeTruthy();
expect('Slider' in antd).toBeTruthy();
expect('Spin' in antd).toBeTruthy();
expect('Steps' in antd).toBeTruthy();
expect('Switch' in antd).toBeTruthy();
expect('Table' in antd).toBeTruthy();
expect('Tabs' in antd).toBeTruthy();
expect('Tag' in antd).toBeTruthy();
expect('TimePicker' in antd).toBeTruthy();
expect('Timeline' in antd).toBeTruthy();
expect('Tooltip' in antd).toBeTruthy();
expect('Transfer' in antd).toBeTruthy();
expect('Tree' in antd).toBeTruthy();
expect('TreeSelect' in antd).toBeTruthy();
expect('Upload' in antd).toBeTruthy();
it('exports modules correctly', () => {
expect(Object.keys(antd)).toMatchSnapshot();
});
// https://github.com/ant-design/ant-design/issues/1970