mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
Merge branch 'master' into feature-3.3.0
This commit is contained in:
commit
59b7195c06
1
.jest.js
1
.jest.js
@ -43,7 +43,6 @@ module.exports = {
|
||||
snapshotSerializers: [
|
||||
'enzyme-to-json/serializer',
|
||||
],
|
||||
mapCoverage: true,
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfigFile: './tsconfig.test.json',
|
||||
|
@ -15,6 +15,18 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.2.3
|
||||
|
||||
`2018-03-02`
|
||||
|
||||
- 🐞 Fix props `onPopupScroll` ts define in `Select`. [#9475](https://github.com/ant-design/ant-design/pull/9475) [@twobin](https://github.com/twobin)
|
||||
- 🐞 Fix `Table` filter dropdown menu popup container. [#9209](https://github.com/ant-design/ant-design/issues/9209)
|
||||
- 🐞 Fix `Timeline` head custom style error in chrome. [#9429](https://github.com/ant-design/ant-design/pull/9429) [@vthinkxie](https://github.com/vthinkxie)
|
||||
- 🐞 Fix `Select` dropdown border. [82092c1](https://github.com/ant-design/ant-design/commit/82092c154ac1fa7ff2f89e1adbdf0aaf22e3ff53)
|
||||
- 🐞 Fix compatibility with less 3. [#7850](https://github.com/ant-design/ant-design/issues/7850)
|
||||
- 🐞 Fix `DatePicker.WeekPicker` year. [#9463](https://github.com/ant-design/ant-design/issues/9463)
|
||||
- 🐞 Fix `Button.Group` align issue in chrome. [#9457](https://github.com/ant-design/ant-design/issues/9457)
|
||||
|
||||
## 3.2.2
|
||||
|
||||
`2018-02-24`
|
||||
|
@ -15,6 +15,18 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.2.3
|
||||
|
||||
`2018-03-02`
|
||||
|
||||
- 🐞 修复组件 `Select` 中的 `onPopupScroll` 属性的 ts 定义。 [#9475](https://github.com/ant-design/ant-design/pull/9475) [@twobin](https://github.com/twobin)
|
||||
- 🐞 修复 `Table` 过滤条件下拉选择框的问题。 [#9209](https://github.com/ant-design/ant-design/issues/9209)
|
||||
- 🐞 修复 `Timeline` 自定义头部样式在 Chrome 下的显示问题。 [#9429](https://github.com/ant-design/ant-design/pull/9429) [@vthinkxie](https://github.com/vthinkxie)
|
||||
- 🐞 修复 `Select` 下拉窗口的边框显示问题。 [82092c1](https://github.com/ant-design/ant-design/commit/82092c154ac1fa7ff2f89e1adbdf0aaf22e3ff53)
|
||||
- 🐞 修复对 less 3 的兼容性问题。 [#7850](https://github.com/ant-design/ant-design/issues/7850)
|
||||
- 🐞 修复 `DatePicker.WeekPicker` 年份问题。 [#9463](https://github.com/ant-design/ant-design/issues/9463)
|
||||
- 🐞 修复 `Button.Group` 在 Chrome 下的定位对齐问题。 [#9457](https://github.com/ant-design/ant-design/issues/9457)
|
||||
|
||||
## 3.2.2
|
||||
|
||||
`2018-02-24`
|
||||
|
@ -11,7 +11,7 @@
|
||||
[![Dependency Status](https://img.shields.io/gemnasium/react-component/trigger.svg?style=flat-square)](https://gemnasium.com/ant-design/ant-design)
|
||||
|
||||
[![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
|
||||
[![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmjs.org/package/antd)
|
||||
[![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](https://npmcharts.com/compare/antd?minimal=true)
|
||||
[![Percentage of issues still open](http://isitmaintained.com/badge/open/ant-design/ant-design.svg)](http://isitmaintained.com/project/ant-design/ant-design "Percentage of issues still open")
|
||||
[![Gitter](https://badges.gitter.im/ant-design/ant-design-english.svg)](https://gitter.im/ant-design/ant-design-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) (English)
|
||||
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)(中文)
|
||||
@ -26,10 +26,10 @@ An enterprise-class UI design language and React-based implementation.
|
||||
|
||||
## Features
|
||||
|
||||
- An enterprise-class UI design language for web applications.
|
||||
- An enterprise-class UI design system for desktop applications.
|
||||
- A set of high-quality React components out of the box.
|
||||
- Written in TypeScript with complete define types.
|
||||
- A npm + webpack + [dva](https://github.com/dvajs/dva) front-end development workflow.
|
||||
- Written in TypeScript with predictable static types.
|
||||
- Work with great development and design resources and tools.
|
||||
|
||||
## Environment Support
|
||||
|
||||
|
@ -2,7 +2,7 @@ import getRequestAnimationFrame, { cancelRequestAnimationFrame } from '../_util/
|
||||
|
||||
const reqAnimFrame = getRequestAnimationFrame();
|
||||
|
||||
export default function throttleByAnimationFrame(fn: () => void) {
|
||||
export default function throttleByAnimationFrame(fn: (...args: any[]) => void) {
|
||||
let requestId: number | null;
|
||||
|
||||
const later = (args: any[]) => () => {
|
||||
|
@ -19,6 +19,6 @@ describe('BackTop', () => {
|
||||
jest.runAllTimers();
|
||||
wrapper.find('.ant-back-top').simulate('click');
|
||||
jest.runAllTimers();
|
||||
expect(Math.round(document.documentElement.scrollTop)).toBe(0);
|
||||
expect(Math.abs(Math.round(document.documentElement.scrollTop))).toBe(0);
|
||||
});
|
||||
});
|
||||
|
@ -108,6 +108,7 @@
|
||||
display: inline-block;
|
||||
> .@{btnClassName} {
|
||||
position: relative;
|
||||
line-height: @btn-height-base - 2px;
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
@ -124,10 +125,12 @@
|
||||
// size
|
||||
&-lg > .@{btnClassName} {
|
||||
.button-size(@btn-height-lg; @btn-padding-lg; @btn-font-size-lg; @btn-border-radius-base);
|
||||
line-height: @btn-height-lg - 2px;
|
||||
}
|
||||
|
||||
&-sm > .@{btnClassName} {
|
||||
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; @btn-border-radius-sm);
|
||||
line-height: @btn-height-sm - 2px;
|
||||
> .@{iconfont-css-prefix} {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
|
@ -16,13 +16,14 @@ exports[`renders ./components/carousel/demo/autoplay.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="-1"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
</h3>
|
||||
</div>
|
||||
<div
|
||||
class="slick-slide slick-active slick-cloned"
|
||||
class="slick-slide slick-active slick-cloned slick-current"
|
||||
data-index="0"
|
||||
style="outline:none"
|
||||
tabindex="-1"
|
||||
@ -64,6 +65,7 @@ exports[`renders ./components/carousel/demo/autoplay.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="4"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
1
|
||||
@ -72,6 +74,7 @@ exports[`renders ./components/carousel/demo/autoplay.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="5"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
2
|
||||
@ -80,6 +83,7 @@ exports[`renders ./components/carousel/demo/autoplay.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="6"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
3
|
||||
@ -88,6 +92,7 @@ exports[`renders ./components/carousel/demo/autoplay.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="7"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
@ -115,13 +120,14 @@ exports[`renders ./components/carousel/demo/basic.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="-1"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
</h3>
|
||||
</div>
|
||||
<div
|
||||
class="slick-slide slick-active slick-cloned"
|
||||
class="slick-slide slick-active slick-cloned slick-current"
|
||||
data-index="0"
|
||||
style="outline:none"
|
||||
tabindex="-1"
|
||||
@ -163,6 +169,7 @@ exports[`renders ./components/carousel/demo/basic.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="4"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
1
|
||||
@ -171,6 +178,7 @@ exports[`renders ./components/carousel/demo/basic.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="5"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
2
|
||||
@ -179,6 +187,7 @@ exports[`renders ./components/carousel/demo/basic.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="6"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
3
|
||||
@ -187,6 +196,7 @@ exports[`renders ./components/carousel/demo/basic.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="7"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
@ -212,9 +222,9 @@ exports[`renders ./components/carousel/demo/fade.md correctly 1`] = `
|
||||
class="slick-track"
|
||||
>
|
||||
<div
|
||||
class="slick-slide slick-active slick-cloned"
|
||||
class="slick-slide slick-active slick-cloned slick-current"
|
||||
data-index="0"
|
||||
style="outline:none;position:relative;left:0;opacity:1;transition:opacity 500ms ease;-webkit-transition:opacity 500ms ease"
|
||||
style="outline:none;position:relative;left:0;opacity:1;transition:opacity 500ms ease, visibility 500ms ease;-webkit-transition:opacity 500ms ease, visibility 500ms ease"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
@ -224,7 +234,7 @@ exports[`renders ./components/carousel/demo/fade.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="1"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease;-webkit-transition:opacity 500ms ease"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease, visibility 500ms ease;-webkit-transition:opacity 500ms ease, visibility 500ms ease"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
@ -234,7 +244,7 @@ exports[`renders ./components/carousel/demo/fade.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="2"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease;-webkit-transition:opacity 500ms ease"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease, visibility 500ms ease;-webkit-transition:opacity 500ms ease, visibility 500ms ease"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
@ -244,7 +254,7 @@ exports[`renders ./components/carousel/demo/fade.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="3"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease;-webkit-transition:opacity 500ms ease"
|
||||
style="outline:none;position:relative;left:0;opacity:0;transition:opacity 500ms ease, visibility 500ms ease;-webkit-transition:opacity 500ms ease, visibility 500ms ease"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
@ -273,13 +283,14 @@ exports[`renders ./components/carousel/demo/vertical.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="-1"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
</h3>
|
||||
</div>
|
||||
<div
|
||||
class="slick-slide slick-active slick-cloned"
|
||||
class="slick-slide slick-active slick-cloned slick-current"
|
||||
data-index="0"
|
||||
style="outline:none"
|
||||
tabindex="-1"
|
||||
@ -321,6 +332,7 @@ exports[`renders ./components/carousel/demo/vertical.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="4"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
1
|
||||
@ -329,6 +341,7 @@ exports[`renders ./components/carousel/demo/vertical.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="5"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
2
|
||||
@ -337,6 +350,7 @@ exports[`renders ./components/carousel/demo/vertical.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="6"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
3
|
||||
@ -345,6 +359,7 @@ exports[`renders ./components/carousel/demo/vertical.md correctly 1`] = `
|
||||
<div
|
||||
class="slick-slide slick-cloned"
|
||||
data-index="7"
|
||||
tabindex="-1"
|
||||
>
|
||||
<h3>
|
||||
4
|
||||
|
@ -11,7 +11,7 @@ function formatValue(value: moment.Moment | null, format: string): string {
|
||||
|
||||
export default class WeekPicker extends React.Component<any, any> {
|
||||
static defaultProps = {
|
||||
format: 'YYYY-wo',
|
||||
format: 'gggg-wo',
|
||||
allowClear: true,
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ const MonthPicker = wrapPicker(createPicker(MonthCalendar), 'YYYY-MM');
|
||||
Object.assign(DatePicker, {
|
||||
RangePicker: wrapPicker(RangePicker),
|
||||
MonthPicker,
|
||||
WeekPicker: wrapPicker(WeekPicker, 'YYYY-wo'),
|
||||
WeekPicker: wrapPicker(WeekPicker, 'gggg-wo'),
|
||||
});
|
||||
|
||||
export default DatePicker as DatePickerDecorator;
|
||||
|
@ -18,6 +18,6 @@ A divider line separates different content.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ----------- | ---- | ------- |
|
||||
| dashed | whether line is dasded | Boolean | false |
|
||||
| dashed | whether line is dashed | Boolean | false |
|
||||
| type | direction type of divider | enum: `horizontal` `vertical` | `horizontal` |
|
||||
| orientation | this is optional, if not set it will have the text in the center | enum: `left` `right` | `center` |
|
||||
|
@ -60,7 +60,7 @@ class RegistrationForm extends React.Component {
|
||||
const value = e.target.value;
|
||||
this.setState({ confirmDirty: this.state.confirmDirty || !!value });
|
||||
}
|
||||
checkPassword = (rule, value, callback) => {
|
||||
compareToFirstPassword = (rule, value, callback) => {
|
||||
const form = this.props.form;
|
||||
if (value && value !== form.getFieldValue('password')) {
|
||||
callback('Two passwords that you enter is inconsistent!');
|
||||
@ -68,14 +68,13 @@ class RegistrationForm extends React.Component {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
checkConfirm = (rule, value, callback) => {
|
||||
validateToNextPassword = (rule, value, callback) => {
|
||||
const form = this.props.form;
|
||||
if (value && this.state.confirmDirty) {
|
||||
form.validateFields(['confirm'], { force: true });
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
handleWebsiteChange = (value) => {
|
||||
let autoCompleteResult;
|
||||
if (!value) {
|
||||
@ -85,7 +84,6 @@ class RegistrationForm extends React.Component {
|
||||
}
|
||||
this.setState({ autoCompleteResult });
|
||||
}
|
||||
|
||||
render() {
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { autoCompleteResult } = this.state;
|
||||
@ -149,7 +147,7 @@ class RegistrationForm extends React.Component {
|
||||
rules: [{
|
||||
required: true, message: 'Please input your password!',
|
||||
}, {
|
||||
validator: this.checkConfirm,
|
||||
validator: this.validateToNextPassword,
|
||||
}],
|
||||
})(
|
||||
<Input type="password" />
|
||||
@ -163,7 +161,7 @@ class RegistrationForm extends React.Component {
|
||||
rules: [{
|
||||
required: true, message: 'Please confirm your password!',
|
||||
}, {
|
||||
validator: this.checkPassword,
|
||||
validator: this.compareToFirstPassword,
|
||||
}],
|
||||
})(
|
||||
<Input type="password" onBlur={this.handleConfirmBlur} />
|
||||
|
@ -13,8 +13,7 @@ export interface ColSize {
|
||||
pull?: number;
|
||||
}
|
||||
|
||||
export interface ColProps {
|
||||
className?: string;
|
||||
export interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
span?: number;
|
||||
order?: number;
|
||||
offset?: number;
|
||||
@ -27,7 +26,6 @@ export interface ColProps {
|
||||
xl?: number | ColSize;
|
||||
xxl?: number | ColSize;
|
||||
prefixCls?: string;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export default class Col extends React.Component<ColProps, {}> {
|
||||
|
@ -31,13 +31,11 @@ export type BreakpointMap = {
|
||||
xxl?: string
|
||||
};
|
||||
|
||||
export interface RowProps {
|
||||
className?: string;
|
||||
export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
gutter?: number | BreakpointMap;
|
||||
type?: 'flex';
|
||||
align?: 'top' | 'middle' | 'bottom';
|
||||
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
||||
style?: React.CSSProperties;
|
||||
prefixCls?: string;
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
|
||||
class="ant-input-group ant-input-group-lg"
|
||||
>
|
||||
<div
|
||||
class="ant-col-4"
|
||||
class="ant-col-5"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
|
@ -63,7 +63,7 @@ class CompactDemo extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
<InputGroup size="large">
|
||||
<Col span={4}>
|
||||
<Col span={5}>
|
||||
<Input defaultValue="0571" />
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
|
@ -31,10 +31,8 @@ const dimensionMap = {
|
||||
|
||||
export type CollapseType = 'clickTrigger' | 'responsive';
|
||||
|
||||
export interface SiderProps {
|
||||
style?: React.CSSProperties;
|
||||
export interface SiderProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
collapsible?: boolean;
|
||||
collapsed?: boolean;
|
||||
defaultCollapsed?: boolean;
|
||||
|
@ -43,7 +43,7 @@ The first level navigation is inclined left near a logo, and the secondary menu
|
||||
|
||||
- **Enlarge the size of the font**
|
||||
|
||||
`12px`、`14px` is a standard font size of navigations,`14px` is used for the first and the second level of the navigation. You can choose a approprigate font size in terms of the level of your navigation.
|
||||
`12px`、`14px` is a standard font size of navigations,`14px` is used for the first and the second level of the navigation. You can choose a appropriate font size in terms of the level of your navigation.
|
||||
|
||||
## Component Overview
|
||||
|
||||
|
@ -3,10 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { SiderProps } from './Sider';
|
||||
|
||||
export interface BasicProps {
|
||||
style?: React.CSSProperties;
|
||||
export interface BasicProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
hasSider?: boolean;
|
||||
}
|
||||
|
||||
|
@ -5703,6 +5703,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -5789,6 +5790,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -10299,6 +10301,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -10385,6 +10388,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -14895,6 +14899,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -14981,6 +14986,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -19491,6 +19497,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -19577,6 +19584,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -24087,6 +24095,7 @@ exports[`Locale Provider should display the text as de 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -24173,6 +24182,7 @@ exports[`Locale Provider should display the text as de 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -28683,6 +28693,7 @@ exports[`Locale Provider should display the text as el 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -28769,6 +28780,7 @@ exports[`Locale Provider should display the text as el 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -33279,6 +33291,7 @@ exports[`Locale Provider should display the text as en 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -33365,6 +33378,7 @@ exports[`Locale Provider should display the text as en 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -37875,6 +37889,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -37961,6 +37976,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -42471,6 +42487,7 @@ exports[`Locale Provider should display the text as es 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -42557,6 +42574,7 @@ exports[`Locale Provider should display the text as es 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -47067,6 +47085,7 @@ exports[`Locale Provider should display the text as et 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -47153,6 +47172,7 @@ exports[`Locale Provider should display the text as et 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -51663,6 +51683,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -51749,6 +51770,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -56259,6 +56281,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -56345,6 +56368,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -60855,6 +60879,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -60941,6 +60966,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -65451,6 +65477,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -65537,6 +65564,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -70047,6 +70075,7 @@ exports[`Locale Provider should display the text as is 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -70133,6 +70162,7 @@ exports[`Locale Provider should display the text as is 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -74643,6 +74673,7 @@ exports[`Locale Provider should display the text as it 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -74729,6 +74760,7 @@ exports[`Locale Provider should display the text as it 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -79239,6 +79271,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -79325,6 +79358,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -83835,6 +83869,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -83921,6 +83956,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -88431,6 +88467,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -88517,6 +88554,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -93027,6 +93065,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -93113,6 +93152,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -97623,6 +97663,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -97709,6 +97750,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -102219,6 +102261,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -102305,6 +102348,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -106815,6 +106859,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -106901,6 +106946,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -111411,6 +111457,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -111497,6 +111544,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -116007,6 +116055,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -116093,6 +116142,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -120603,6 +120653,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -120689,6 +120740,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -125199,6 +125251,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -125285,6 +125338,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -129795,6 +129849,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -129881,6 +129936,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -134391,6 +134447,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -134477,6 +134534,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -138987,6 +139045,7 @@ exports[`Locale Provider should display the text as th 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -139073,6 +139132,7 @@ exports[`Locale Provider should display the text as th 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -143583,6 +143643,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -143669,6 +143730,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -148179,6 +148241,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -148265,6 +148328,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -152775,6 +152839,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -152861,6 +152926,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -157371,6 +157437,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -157457,6 +157524,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -161967,6 +162035,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
@ -162053,6 +162122,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
|
||||
<input
|
||||
class="ant-checkbox-input"
|
||||
type="checkbox"
|
||||
value="on"
|
||||
/>
|
||||
<span
|
||||
class="ant-checkbox-inner"
|
||||
|
@ -29,9 +29,15 @@ class PopoverContainer extends React.Component {
|
||||
getSuggestionContainer = () => {
|
||||
return this.popover.getPopupDomNode();
|
||||
}
|
||||
visibleChange = (visible) => {
|
||||
if (visible && this.mention) {
|
||||
this.mention.focus();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mention = (
|
||||
<Mention
|
||||
ref={ele => this.mention = ele}
|
||||
style={{ width: '100%' }}
|
||||
onChange={onChange}
|
||||
defaultValue={toContentState('@afc163')}
|
||||
@ -41,7 +47,13 @@ class PopoverContainer extends React.Component {
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<Popover trigger="click" content={mention} title="Title" ref={popover => this.popover = popover}>
|
||||
<Popover
|
||||
trigger="click"
|
||||
content={mention}
|
||||
title="Title"
|
||||
ref={popover => this.popover = popover}
|
||||
onVisibleChange={this.visibleChange}
|
||||
>
|
||||
<Button type="primary">Click Me</Button>
|
||||
</Popover>
|
||||
);
|
||||
|
@ -4,7 +4,7 @@ type: Data Entry
|
||||
title: Mention
|
||||
---
|
||||
|
||||
Mention component。
|
||||
Mention component.
|
||||
|
||||
## When To Use
|
||||
|
||||
|
@ -111,7 +111,7 @@ export default class Mention extends React.Component<MentionProps, MentionState>
|
||||
}
|
||||
}
|
||||
focus = () => {
|
||||
this.mentionEle._editor.focus();
|
||||
this.mentionEle._editor.focusEditor();
|
||||
}
|
||||
mentionRef = (ele: any) => {
|
||||
this.mentionEle = ele;
|
||||
|
@ -43,6 +43,7 @@ export interface SelectProps extends AbstractSelectProps {
|
||||
onDeselect?: (value: SelectValue) => any;
|
||||
onBlur?: () => any;
|
||||
onFocus?: () => any;
|
||||
onPopupScroll?: () => any;
|
||||
onInputKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
||||
maxTagCount?: number;
|
||||
maxTagPlaceholder?: React.ReactNode | ((omittedValues: SelectValue[]) => React.ReactNode);
|
||||
|
@ -100,6 +100,8 @@
|
||||
};
|
||||
|
||||
this.colorEasing = BezierEasing(0.26, 0.09, 0.37, 0.18);
|
||||
// less 3 requires a return
|
||||
return '';
|
||||
})()`;
|
||||
}
|
||||
// It is hacky way to make this function will be compiled preferentially by less
|
||||
|
@ -387,6 +387,8 @@
|
||||
@tabs-card-height: 40px;
|
||||
@tabs-card-active-color: @primary-color;
|
||||
@tabs-title-font-size: @font-size-base;
|
||||
@tabs-title-font-size-lg: @font-size-lg;
|
||||
@tabs-title-font-size-sm: @font-size-base;
|
||||
@tabs-ink-bar-bg-color: @primary-color;
|
||||
@tab-bar-margin: 0 0 16px 0;
|
||||
@tab-horizontal-margin: 0 32px 0 0;
|
||||
|
@ -34,6 +34,14 @@
|
||||
font-weight: 500;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: @border-radius-base;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-top-right-radius: @border-radius-base;
|
||||
}
|
||||
|
||||
&[colspan] {
|
||||
text-align: center;
|
||||
border-bottom: 0;
|
||||
@ -540,6 +548,9 @@
|
||||
table {
|
||||
border-radius: @border-radius-base 0 0 0;
|
||||
}
|
||||
.ant-table-thead > tr > th:last-child {
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-fixed-right {
|
||||
@ -555,6 +566,9 @@
|
||||
color: transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
.ant-table-thead > tr > th:first-child {
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&&-scroll-position-left &-fixed-left {
|
||||
|
@ -207,7 +207,7 @@
|
||||
}
|
||||
|
||||
&-large &-nav-container {
|
||||
font-size: @font-size-lg;
|
||||
font-size: @tabs-title-font-size-lg;
|
||||
}
|
||||
|
||||
&-large &-tab {
|
||||
@ -215,7 +215,7 @@
|
||||
}
|
||||
|
||||
&-small &-nav-container {
|
||||
font-size: @font-size-base;
|
||||
font-size: @tabs-title-font-size-sm;
|
||||
}
|
||||
|
||||
&-small &-tab {
|
||||
|
@ -32,7 +32,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
|
||||
| overlayClassName | Class name of the tooltip card | string | - |
|
||||
| overlayStyle | Style of the tooltip card | object | - |
|
||||
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` |
|
||||
| trigger | Tooltip trigger mode | `hover` \| `focus` \| `click` | `hover` |
|
||||
| trigger | Tooltip trigger mode | `hover` \| `focus` \| `click` \| `contextMenu` | `hover` |
|
||||
| visible | Whether the floating tooltip card is visible or not | boolean | `false` |
|
||||
| onVisibleChange | Callback executed when visibility of the tooltip card is changed | (visible) => void | - |
|
||||
|
||||
|
@ -25,7 +25,7 @@ export interface AbstractTooltipProps {
|
||||
mouseEnterDelay?: number;
|
||||
mouseLeaveDelay?: number;
|
||||
transitionName?: string;
|
||||
trigger?: 'hover' | 'focus' | 'click';
|
||||
trigger?: 'hover' | 'focus' | 'click' | 'contextMenu';
|
||||
openClassName?: string;
|
||||
arrowPointAtCenter?: boolean;
|
||||
autoAdjustOverflow?: boolean | AdjustOverflow;
|
||||
|
@ -34,7 +34,7 @@ title: Tooltip
|
||||
| overlayClassName | 卡片类名 | string | 无 |
|
||||
| overlayStyle | 卡片样式 | object | 无 |
|
||||
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | top |
|
||||
| trigger | 触发行为,可选 `hover/focus/click` | string | hover |
|
||||
| trigger | 触发行为,可选 `hover/focus/click/contextMenu` | string | hover |
|
||||
| visible | 用于手动控制浮层显隐 | boolean | false |
|
||||
| onVisibleChange | 显示隐藏的回调 | (visible) => void | 无 |
|
||||
|
||||
|
@ -20,6 +20,7 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
|
||||
| allowClear | Whether allow clear | boolean | false |
|
||||
| defaultValue | To set the initial selected treeNode(s). | string\|string\[] | - |
|
||||
| disabled | Disabled or not | boolean | false |
|
||||
| dropdownClassName | className of dropdown menu | string | - |
|
||||
| dropdownMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width | boolean | true |
|
||||
| dropdownStyle | To set the style of the dropdown menu | object | - |
|
||||
| filterTreeNode | Whether to filter treeNodes by input value. The value of `treeNodeFilterProp` is used for filtering by default. | boolean\|Function(inputValue: string, treeNode: TreeNode) (should return boolean) | Function |
|
||||
|
@ -19,7 +19,6 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
transitionName: 'slide-up',
|
||||
choiceTransitionName: 'zoom',
|
||||
showSearch: false,
|
||||
dropdownClassName: 'ant-select-tree-dropdown',
|
||||
};
|
||||
|
||||
private rcTreeSelect: any;
|
||||
@ -52,6 +51,7 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
size,
|
||||
notFoundContent,
|
||||
dropdownStyle,
|
||||
dropdownClassName,
|
||||
...restProps,
|
||||
} = this.props;
|
||||
|
||||
@ -67,6 +67,7 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
return (
|
||||
<RcTreeSelect
|
||||
{...restProps}
|
||||
dropdownClassName={classNames(dropdownClassName, `${prefixCls}-tree-dropdown`)}
|
||||
prefixCls={prefixCls}
|
||||
className={cls}
|
||||
dropdownStyle={{ maxHeight: '100vh', overflow: 'auto', ...dropdownStyle }}
|
||||
|
@ -20,6 +20,7 @@ title: TreeSelect
|
||||
| allowClear | 显示清除按钮 | boolean | false |
|
||||
| defaultValue | 指定默认选中的条目 | string/string\[] | - |
|
||||
| disabled | 是否禁用 | boolean | false |
|
||||
| dropdownClassName | 下拉菜单的 className 属性 | string | - |
|
||||
| dropdownMatchSelectWidth | 下拉菜单和选择器同宽 | boolean | true |
|
||||
| dropdownStyle | 下拉菜单的样式 | object | - |
|
||||
| filterTreeNode | 是否根据输入项进行筛选,默认用 treeNodeFilterProp 的值作为要筛选的 TreeNode 的属性值 | boolean\|Function(inputValue: string, treeNode: TreeNode) (函数需要返回bool值) | Function |
|
||||
|
@ -37,7 +37,7 @@ exports[`renders ./components/tree/demo/basic.md correctly 1`] = `
|
||||
class="ant-tree-treenode-disabled"
|
||||
>
|
||||
<span
|
||||
class="ant-tree-switcher ant-tree-switcher_open ant-tree-switcher-disabled"
|
||||
class="ant-tree-switcher ant-tree-switcher_open"
|
||||
/>
|
||||
<span
|
||||
class="ant-tree-checkbox ant-tree-checkbox-checked ant-tree-checkbox-disabled"
|
||||
|
@ -258,7 +258,7 @@ describe('Upload List', () => {
|
||||
</Upload>
|
||||
);
|
||||
wrapper.setState({});
|
||||
await delay(0);
|
||||
await delay(20);
|
||||
expect(wrapper.state().fileList[2].thumbUrl).not.toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
28
package.json
Executable file → Normal file
28
package.json
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "3.2.2",
|
||||
"version": "3.2.3",
|
||||
"title": "Ant Design",
|
||||
"description": "An enterprise-class UI design language and React-based implementation",
|
||||
"homepage": "http://ant.design/",
|
||||
@ -79,7 +79,7 @@
|
||||
"rc-upload": "~2.4.0",
|
||||
"rc-util": "^4.0.4",
|
||||
"react-lazy-load": "^3.0.12",
|
||||
"react-slick": "~0.17.0",
|
||||
"react-slick": "~0.20.0",
|
||||
"shallowequal": "^1.0.1",
|
||||
"warning": "~3.0.0"
|
||||
},
|
||||
@ -88,7 +88,7 @@
|
||||
"@types/react": "^16.0.0",
|
||||
"@types/react-dom": "^16.0.0",
|
||||
"ansi-styles": "^3.2.0",
|
||||
"antd-tools": "^5.1.0",
|
||||
"antd-tools": "^5.1.2",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-eslint": "^8.1.1",
|
||||
"babel-plugin-import": "^1.0.0",
|
||||
@ -120,14 +120,14 @@
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.0.2",
|
||||
"eslint-plugin-markdown": "~1.0.0-beta.4",
|
||||
"eslint-plugin-react": "7.5.1",
|
||||
"eslint-plugin-react": "7.7.0",
|
||||
"eslint-tinker": "^0.4.0",
|
||||
"fetch-jsonp": "^1.0.3",
|
||||
"glob": "^7.1.1",
|
||||
"immutability-helper": "^2.5.0",
|
||||
"jest": "^21.1.0",
|
||||
"jest": "^22.4.2",
|
||||
"jsonml.js": "^0.1.0",
|
||||
"lint-staged": "^6.0.0",
|
||||
"lint-staged": "^7.0.0",
|
||||
"lz-string": "^1.4.4",
|
||||
"majo": "^0.4.1",
|
||||
"mockdate": "^2.0.1",
|
||||
@ -153,15 +153,15 @@
|
||||
"react-sublime-video": "^0.2.0",
|
||||
"react-virtualized": "~9.13.0",
|
||||
"remark-frontmatter": "^1.1.0",
|
||||
"remark-parse": "^4.0.0",
|
||||
"remark-stringify": "^4.0.0",
|
||||
"remark-parse": "^5.0.0",
|
||||
"remark-stringify": "^5.0.0",
|
||||
"remark-yaml-config": "^4.0.1",
|
||||
"reqwest": "^2.0.5",
|
||||
"rimraf": "^2.5.4",
|
||||
"scrollama": "^0.6.1",
|
||||
"stylelint": "^8.0.0",
|
||||
"scrollama": "^1.4.1",
|
||||
"stylelint": "^9.1.1",
|
||||
"stylelint-config-standard": "^18.0.0",
|
||||
"typescript": "~2.6.1",
|
||||
"typescript": "~2.7.2",
|
||||
"unified": "^6.1.5",
|
||||
"values.js": "^1.0.3",
|
||||
"xhr2": "^0.1.3"
|
||||
@ -199,14 +199,14 @@
|
||||
},
|
||||
"lint-staged": {
|
||||
"components/**/*.tsx": [
|
||||
"lint-staged:ts"
|
||||
"npm run lint-staged:ts"
|
||||
],
|
||||
"{tests,site,scripts,components}/**/*.{js,jsx}": [
|
||||
"lint-staged:es"
|
||||
"npm run lint-staged:es"
|
||||
],
|
||||
"{site,components}/**/*.less": "stylelint --syntax less",
|
||||
"components/*/demo/*.md": [
|
||||
"lint-staged:demo"
|
||||
"npm run lint-staged:demo"
|
||||
]
|
||||
},
|
||||
"pre-commit": [
|
||||
|
@ -6,6 +6,10 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="An enterprise-class UI design language and React-based implementation with a set of high-quality React components, one of best React UI library for enterprises">
|
||||
<title>Ant Design - A UI Design Language</title>
|
||||
<!-- Polyfills -->
|
||||
<!--[if IE]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??es6-shim/0.35.1/es6-sham.min.js,es6-shim/0.35.1/es6-shim.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
(function() {
|
||||
function isLocalStorageNameSupported() {
|
||||
|
@ -71,7 +71,7 @@ export default class MainContent extends React.Component {
|
||||
}
|
||||
this.timer = setTimeout(() => {
|
||||
if (window.location.hash) {
|
||||
window.location.hash = window.location.hash;
|
||||
document.querySelector(window.location.hash).scrollIntoView();
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
@ -1,12 +1,5 @@
|
||||
/* eslint-disable global-require */
|
||||
import { jsdom } from 'jsdom';
|
||||
|
||||
// fixed jsdom miss
|
||||
if (typeof window !== 'undefined') {
|
||||
const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>';
|
||||
global.document = jsdom(documentHTML);
|
||||
global.window = document.parentWindow;
|
||||
|
||||
global.window.resizeTo = (width, height) => {
|
||||
global.window.innerWidth = width || global.window.innerWidth;
|
||||
global.window.innerHeight = height || global.window.innerHeight;
|
||||
@ -14,10 +7,16 @@ if (typeof window !== 'undefined') {
|
||||
};
|
||||
}
|
||||
|
||||
global.requestAnimationFrame = global.requestAnimationFrame || function (cb) {
|
||||
// The built-in requestAnimationFrame and cancelAnimationFrame not working with jest.runFakeTimes()
|
||||
// https://github.com/facebook/jest/issues/5147
|
||||
global.requestAnimationFrame = function (cb) {
|
||||
return setTimeout(cb, 0);
|
||||
};
|
||||
|
||||
global.cancelAnimationFrame = function (cb) {
|
||||
return clearTimeout(cb, 0);
|
||||
};
|
||||
|
||||
const Enzyme = require('enzyme');
|
||||
|
||||
let Adapter;
|
||||
|
Loading…
Reference in New Issue
Block a user