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

This commit is contained in:
afc163 2016-11-09 14:44:05 +08:00
commit 3b08a6479c
109 changed files with 112 additions and 111 deletions

View File

@ -12,7 +12,7 @@
"newlineAfterBlock": false,
"maxCharPerLine": false,
"excludedFiles": [
"components/layout/style/mixin.less",
"components/grid/style/mixin.less",
"components/style/core/base.less",
"components/style/core/iconfont.less",
"components/style/core/normalize.less",

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
title: Affix
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 固钉
type: Other
type: Navigation
title: Affix
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
title: Alert
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 警告提示
type: Views
type: Feedback
title: Alert
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
cols: 1
title: AutoComplete
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 自动完成
type: Form Controls
type: Data Entry
cols: 1
title: AutoComplete
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
title: BackTop
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Navigation
subtitle: 回到顶部
title: BackTop
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Badge
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 徽标数
type: Views
type: Data Display
title: Badge
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Basic
type: General
title: Button
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Basic
type: General
title: Button
subtitle: 按钮
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
cols: 1
title: Calendar
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
subtitle: 日历
cols: 1
title: Calendar

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Card
cols: 1
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Card
subtitle: 卡片
cols: 1

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Carousel
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Carousel
subtitle: 走马灯
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Cascader
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Cascader
subtitle: 级联选择
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Checkbox
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 多选框
type: Form Controls
type: Data Entry
title: Checkbox
---

View File

@ -1,2 +1,2 @@
import { Col } from '../layout';
import { Col } from '../grid';
export default Col;

View File

@ -1,2 +1,2 @@
import '../../style/index.less';
import '../../layout/style/index.less';
import '../../grid/style/index.less';

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Collapse
cols: 1
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Collapse
subtitle: 折叠面板
cols: 1

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: DatePicker
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: DatePicker
subtitle: 日期选择框
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Navigation
title: Dropdown
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 下拉菜单
type: Views
type: Navigation
title: Dropdown
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
cols: 1
title: Form
---
@ -75,11 +75,10 @@ If the form has been decorated by `Form.create` then it has `this.props.form` pr
### this.props.form.getFieldDecorator(id, options)
After wrapped by `getFieldDecorator`, `value` `onChange` props will be added to form controlsthe flow of form data will be handled by Form which will cause:
After wrapped by `getFieldDecorator`, `value`(or other property defined by `valuePropName`) `onChange`(or other property defined by `trigger`) props will be added to form controlsthe flow of form data will be handled by Form which will cause:
1. You don't need to use `onChange` and should not add `value` `onChange` to controls. (There are warnings after `antd@2.0`)
2. You can not set default value via `defaultValue` prop, you should use `initialValue` in `getFieldDecorator` instead.
1. You don't need to use `onChange` to collect data, but you still can listen to `onChange`(and so on) events.
2. You can not set value of form control via `value` `defaultValue` prop, and you should set default value with `initialValue` in `getFieldDecorator` instead.
3. You don't need to call `setState` manully, please use `this.props.form.setFieldsValue` to change value programmatically.
#### Special attention

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 表单
type: Form Controls
type: Data Entry
cols: 1
title: Form
---
@ -77,10 +77,10 @@ CustomizedForm = Form.create({})(CustomizedForm);
### this.props.form.getFieldDecorator(id, options)
经过 `getFieldDecorator` 包装的控件,表单控件会自动添加 `value` `onChange` 等属性,数据同步将被 Form 接管,这会导致以下结果:
经过 `getFieldDecorator` 包装的控件,表单控件会自动添加 `value`(或 `valuePropName` 指定的其他属性) `onChange`(或 `trigger` 指定的其他属性),数据同步将被 Form 接管,这会导致以下结果:
1. 你不再需要用 `onChange` 来做同步,也不应该给控件单独添加 `value` `onChange` 等属性。2.0 后会在控制台进行警告)
2. 你不能用控件的 `defaultValue` 属性来设置默认值,请`getFieldDecorator` 里的 `initialValue`
1. 你不再需要用 `onChange` 来做同步,但还是可以继续监听 `onChange` 等事件。
2. 你不能用控件的 `value` `defaultValue` 等属性来设置表单域的值,默认值可以`getFieldDecorator` 里的 `initialValue`
3. 你不需要用 `setState`,可以使用 `this.props.form.setFieldsValue` 来动态改变表单值。
#### 特别注意

View File

@ -2,7 +2,7 @@
@import "../../style/mixins/index";
@import "../../input/style/mixin";
@import "../../button/style/mixin";
@import "../../layout/style/mixin";
@import "../../grid/style/mixin";
@import "./mixin";
@form-prefix-cls: ~"@{ant-prefix}-form";

View File

@ -2,4 +2,4 @@ import '../../style/index.less';
import './index.less';
// style dependencies
import '../../layout/style';
import '../../grid/style';

View File

@ -1,15 +1,15 @@
---
category: Components
type: Basic
type: Layout
cols: 1
title: Layout
title: Grid
---
24 Grids System。
## Design concept
<div class="layout-demo">
<div class="grid-demo">
<div class="ant-row demo-row">
<div class="ant-col-24 demo-col demo-col-1">
100%

View File

@ -1,16 +1,16 @@
---
category: Components
subtitle: 栅格
type: Basic
type: Layout
cols: 1
title: Layout
title: Grid
---
24 栅格系统。
## 设计理念
<div class="layout-demo">
<div class="grid-demo">
<div class="ant-row demo-row">
<div class="ant-col-24 demo-col demo-col-1">
100%

View File

@ -1,6 +1,6 @@
---
category: Components
type: Basic
type: General
title: Icon
toc: false
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 图标
type: Basic
type: General
title: Icon
toc: false
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: InputNumber
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 数字输入框
type: Form Controls
type: Data Entry
title: InputNumber
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Input
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 输入框
type: Form Controls
type: Data Entry
title: Input
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Localization
cols: 1
title: LocaleProvider
---

View File

@ -2,7 +2,7 @@
category: Components
subtitle: 国际化
cols: 1
type: Other
type: Localization
title: LocaleProvider
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Entry
title: Mention
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 提及
type: Views
type: Data Entry
title: Mention
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
noinstant: true
title: Message
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 全局提示
type: Views
type: Feedback
noinstant: true
title: Message
---

View File

@ -1,5 +1,5 @@
---
type: Views
type: Feedback
category: Components
title: Modal
---

View File

@ -1,5 +1,5 @@
---
type: Views
type: Feedback
category: Components
subtitle: 对话框
title: Modal

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
noinstant: true
title: Notification
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
noinstant: true
title: Notification
subtitle: 通知提醒框

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
title: Popconfirm
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 气泡确认框
type: Views
type: Feedback
title: Popconfirm
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Popover
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 气泡卡片
type: Views
type: Data Display
title: Popover
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Feedback
title: Progress
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 进度条
type: Views
type: Feedback
title: Progress
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Radio
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 单选框
type: Form Controls
type: Data Entry
title: Radio
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Rate
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 评分
type: Form Controls
type: Data Entry
title: Rate
---

View File

@ -1,2 +1,2 @@
import { Row } from '../layout';
import { Row } from '../grid';
export default Row;

View File

@ -1,2 +1,2 @@
import '../../style/index.less';
import '../../layout/style/index.less';
import '../../grid/style/index.less';

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Select
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 选择器
type: Form Controls
type: Data Entry
title: Select
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Slider
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 滑动输入条
type: Form Controls
type: Data Entry
title: Slider
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Feedback
title: Spin
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Other
type: Feedback
title: Spin
subtitle: 加载中
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: Switch
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 开关
type: Form Controls
type: Data Entry
title: Switch
---

View File

@ -1,7 +1,7 @@
---
category: Components
cols: 1
type: Views
type: Data Display
title: Table
---

View File

@ -1,7 +1,7 @@
---
category: Components
cols: 1
type: Views
type: Data Display
title: Table
subtitle: 表格
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Tag
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 标签
type: Views
type: Data Display
title: Tag
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
title: TimePicker
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 时间选择框
type: Form Controls
type: Data Entry
title: TimePicker
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Timeline
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 时间轴
type: Views
type: Data Display
title: Timeline
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Views
type: Data Display
title: Tooltip
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 文字提示
type: Views
type: Data Display
title: Tooltip
---

View File

@ -1,6 +1,6 @@
---
category: Components
type: Form Controls
type: Data Entry
cols: 1
title: Transfer
---

View File

@ -1,7 +1,7 @@
---
category: Components
subtitle: 穿梭框
type: Form Controls
type: Data Entry
cols: 1
title: Transfer
---

Some files were not shown because too many files have changed in this diff Show More