mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
07c39529bb
@ -59,6 +59,7 @@ export interface CascaderProps {
|
|||||||
onPopupVisibleChange?: (popupVisible: boolean) => void;
|
onPopupVisibleChange?: (popupVisible: boolean) => void;
|
||||||
prefixCls?: string;
|
prefixCls?: string;
|
||||||
inputPrefixCls?: string;
|
inputPrefixCls?: string;
|
||||||
|
getPopupContainer?: (triggerNode: Element) => HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightKeyword(str: string, keyword: string, prefixCls: string) {
|
function highlightKeyword(str: string, keyword: string, prefixCls: string) {
|
||||||
|
@ -60,7 +60,7 @@ const RegistrationForm = Form.create()(React.createClass({
|
|||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
this.setState({ passwordDirty: this.state.passwordDirty || !!value });
|
this.setState({ passwordDirty: this.state.passwordDirty || !!value });
|
||||||
},
|
},
|
||||||
checkPassowrd(rule, value, callback) {
|
checkPassword(rule, value, callback) {
|
||||||
const form = this.props.form;
|
const form = this.props.form;
|
||||||
if (value && value !== form.getFieldValue('password')) {
|
if (value && value !== form.getFieldValue('password')) {
|
||||||
callback('Two passwords that you enter is inconsistent!');
|
callback('Two passwords that you enter is inconsistent!');
|
||||||
@ -135,7 +135,7 @@ const RegistrationForm = Form.create()(React.createClass({
|
|||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: 'Please confirm your password!',
|
required: true, message: 'Please confirm your password!',
|
||||||
}, {
|
}, {
|
||||||
validator: this.checkPassowrd,
|
validator: this.checkPassword,
|
||||||
}],
|
}],
|
||||||
})(
|
})(
|
||||||
<Input type="password" />
|
<Input type="password" />
|
||||||
|
@ -22,7 +22,7 @@ export interface AbstractTooltipProps {
|
|||||||
trigger?: 'hover' | 'focus' | 'click';
|
trigger?: 'hover' | 'focus' | 'click';
|
||||||
openClassName?: string;
|
openClassName?: string;
|
||||||
arrowPointAtCenter?: boolean;
|
arrowPointAtCenter?: boolean;
|
||||||
getTooltipContainer?: (triggerNode: React.ReactNode) => HTMLElement;
|
getTooltipContainer?: (triggerNode: Element) => HTMLElement;
|
||||||
children?: React.ReactElement<any>;
|
children?: React.ReactElement<any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
53
tests/__snapshots__/index.test.js.snap
Normal file
53
tests/__snapshots__/index.test.js.snap
Normal 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",
|
||||||
|
]
|
||||||
|
`;
|
@ -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/1638
|
||||||
// https://github.com/ant-design/ant-design/issues/1968
|
// https://github.com/ant-design/ant-design/issues/1968
|
||||||
it('should has modules in antd', () => {
|
it('exports modules correctly', () => {
|
||||||
expect('Affix' in antd).toBeTruthy();
|
expect(Object.keys(antd)).toMatchSnapshot();
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// https://github.com/ant-design/ant-design/issues/1970
|
// https://github.com/ant-design/ant-design/issues/1970
|
||||||
|
Loading…
Reference in New Issue
Block a user