diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md
index 19967de83..daadcc497 100644
--- a/components/date-picker/index.en-US.md
+++ b/components/date-picker/index.en-US.md
@@ -41,7 +41,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
### Common Events
| Events Name | Description | Arguments |
| --- | --- | --- |
-| openChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) |
+| openChange | a callback function, can be executed whether the popup calendar is popped up or closed | function(status) |
### Common Methods
@@ -58,7 +58,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
| disabledTime | to specify the time that cannot be selected | function(date) | - |
| format | to set the date format, refer to [moment.js](http://momentjs.com/) | string | "YYYY-MM-DD" |
| renderExtraFooter | render extra footer in panel by setting a scoped slot | slot="renderExtraFooter" | - |
-| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
+| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](#/us/components/time-picker/API) |
| showTime.defaultValue | to set default time of selected date | [moment](http://momentjs.com/) | moment() |
| showToday | whether to show "Today" button | boolean | true |
| value | to set date | [moment](http://momentjs.com/) | - |
@@ -66,9 +66,9 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
### DatePicker Events
| Events Name | Description | Arguments |
| --- | --- | --- |
-| calendarChange | a callback function, can be executed when the start time or the end time of the range is changing | function(dates: [moment, moment], dateStrings: [string, string]) |
-| change | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) |
-| ok | callback when click ok button | function() |
+| calendarChange | a callback function, can be executed when the start time or the end time of the range is changing | function(dates: [moment, moment], dateStrings: [string, string]) |
+| change | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) |
+| ok | callback when click ok button | function() |
### MonthPicker
@@ -83,7 +83,7 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
### MonthPicker Events
| Events Name | Description | Arguments |
| --- | --- | --- |
-| change | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) |
+| change | a callback function, can be executed when the selected time is changing | function(date: moment, dateString: string) |
### WeekPicker
@@ -107,13 +107,13 @@ The following APIs are shared by DatePicker, MonthPicker, RangePicker, WeekPicke
| format | to set the date format | string | "YYYY-MM-DD HH:mm:ss" |
| ranges | preseted ranges for quick selection | { \[range: string\]: [moment](http://momentjs.com/)\[] } \| () => { \[range: string\]: [moment](http://momentjs.com/)\[] } | - |
| renderExtraFooter | render extra footer in panel by setting a scoped slot| slot="renderExtraFooter" | - |
-| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](/components/time-picker/#API) |
+| showTime | to provide an additional time selection | object\|boolean | [TimePicker Options](#/us/components/time-picker/API) |
| showTime.defaultValue | to set default time of selected date, [demo](https://ant.design/components/date-picker/#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/)\[] | [moment(), moment()] |
| value | to set date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)] | - |
### RangePicker Events
| Events Name | Description | Arguments |
| --- | --- | --- |
-| change | a callback function, can be executed when the selected time is changing | function(dates: [moment, moment], dateStrings: [string, string]) |
+| change | a callback function, can be executed when the selected time is changing | function(dates: [moment, moment], dateStrings: [string, string]) |
| ok | callback when click ok button | function() |
diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md
index cac1b6458..cdc588c4e 100644
--- a/components/date-picker/index.zh-CN.md
+++ b/components/date-picker/index.zh-CN.md
@@ -42,7 +42,7 @@
| 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
-| openChange | 弹出日历和关闭日历的回调 | function(status) |
+| openChange | 弹出日历和关闭日历的回调 | function(status) |
### 共同的方法
@@ -59,7 +59,7 @@
| disabledTime | 不可选择的时间 | function(date) | 无 |
| format | 展示的日期格式,配置参考 [moment.js](http://momentjs.com/) | string | "YYYY-MM-DD" |
| renderExtraFooter | 在面板中添加额外的页脚 | slot="renderExtraFooter" | - |
-| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
+| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](#/cn/components/time-picker/API) |
| showTime.defaultValue | 设置用户选择日期时默认的时分秒 | [moment](http://momentjs.com/) | moment() |
| showToday | 是否展示“今天”按钮 | boolean | true |
| value | 日期 | [moment](http://momentjs.com/) | 无 |
@@ -68,8 +68,8 @@
| 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
-| change | 时间发生变化的回调 | function(date: moment, dateString: string) |
-| ok | 点击确定按钮的回调 | function() |
+| change | 时间发生变化的回调 | function(date: moment, dateString: string) |
+| ok | 点击确定按钮的回调 | function() |
### MonthPicker
@@ -110,8 +110,8 @@
| format | 展示的日期格式 | string | "YYYY-MM-DD HH:mm:ss" |
| ranges | 预设时间范围快捷选择 | { \[range: string\]: [moment](http://momentjs.com/)\[] } \| () => { \[range: string\]: [moment](http://momentjs.com/)\[] } | 无 |
| renderExtraFooter | 在面板中添加额外的页脚 | slot="renderExtraFooter" | - |
-| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](/components/time-picker/#API) |
-| showTime.defaultValue | 设置用户选择日期时默认的时分秒,[例子](https://ant.design/components/date-picker/#components-date-picker-demo-disabled-date) | [moment](http://momentjs.com/)\[] | [moment(), moment()] |
+| showTime | 增加时间选择功能 | Object\|boolean | [TimePicker Options](#/cn/components/time-picker/API) |
+| showTime.defaultValue | 设置用户选择日期时默认的时分秒 | [moment](http://momentjs.com/)\[] | [moment(), moment()] |
| value | 日期 | [moment](http://momentjs.com/)\[] | 无 |
### RangePicker事件
diff --git a/components/icon/demo/index.vue b/components/icon/demo/index.vue
index 4b80ef443..5ba78441b 100644
--- a/components/icon/demo/index.vue
+++ b/components/icon/demo/index.vue
@@ -40,6 +40,10 @@ const md = {
`,
}
export default {
+ category: 'Components',
+ type: 'General',
+ title: 'Icon',
+ subtitle: '图标',
render () {
return (
diff --git a/components/index.js b/components/index.js
index 454ef9d6a..e0c6d11af 100644
--- a/components/index.js
+++ b/components/index.js
@@ -1,4 +1,3 @@
-import './style.js'
import Button from './button'
const ButtonGroup = Button.Group
export { Button, ButtonGroup }
diff --git a/components/locale-provider/demo/index.vue b/components/locale-provider/demo/index.vue
index 46e7bb1d6..6584411a6 100644
--- a/components/locale-provider/demo/index.vue
+++ b/components/locale-provider/demo/index.vue
@@ -3,6 +3,20 @@ import Basic from './basic'
import All from './all'
import CN from '../index.zh-CN.md'
import US from '../index.en-US.md'
+const md = {
+ cn: `## API
+
+| 参数 | 说明 | 类型 | 默认值 |
+| --- | --- | --- | --- |
+| locale | 语言包配置,语言包可到 \`antd/lib/locale-provider/\` 目录下寻找 | object | - |
+`,
+ us: `## API
+
+| Property | Description | Type | Default |
+| -------- | ----------- | ---- | ------- |
+| locale | language package setting, you can find the packages in this path: \`antd/lib/locale-provider/\` | object | - |
+`,
+}
export default {
category: 'Components',
subtitle: '国际化',
@@ -18,6 +32,7 @@ export default {
+
)
},
diff --git a/components/locale-provider/index.en-US.md b/components/locale-provider/index.en-US.md
index 86a87956a..48f043a57 100644
--- a/components/locale-provider/index.en-US.md
+++ b/components/locale-provider/index.en-US.md
@@ -49,10 +49,4 @@ If you can't find your language, you are welcome to create a locale package base
This component aims for localization of the built-in text, if you want to support other documents, we recommend using [vue-i18n](https://github.com/kazupon/vue-i18n).
-## API
-
-| Property | Description | Type | Default |
-| -------- | ----------- | ---- | ------- |
-| locale | language package setting, you can find the packages in this path: `antd/lib/locale-provider/` | object | - |
-
## Examples
diff --git a/components/locale-provider/index.zh-CN.md b/components/locale-provider/index.zh-CN.md
index eb98dbf52..a0f27b86e 100644
--- a/components/locale-provider/index.zh-CN.md
+++ b/components/locale-provider/index.zh-CN.md
@@ -48,10 +48,4 @@ const { LocaleProvider, locales } = window.antd;
本模块仅用于组件的内建文案,若有业务文案的国际化需求,建议使用 [vue-i18n](https://github.com/kazupon/vue-i18n)
-## API
-
-| 参数 | 说明 | 类型 | 默认值 |
-| --- | --- | --- | --- |
-| locale | 语言包配置,语言包可到 `antd/lib/locale-provider/` 目录下寻找 | object | - |
-
## 代码演示
diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md
index 390da0b10..4179e30f6 100644
--- a/components/menu/index.en-US.md
+++ b/components/menu/index.en-US.md
@@ -36,7 +36,7 @@
| --- | --- | --- |
| click | callback executed when a menu item is clicked | function({ item, key, keyPath }) |
| deselect | callback executed when a menu item is deselected, only supported for multiple mode | function({ item, key, selectedKeys }) |
-| openChange | called when open/close sub menu | function(openKeys: string\[]) |
+| openChange | called when open/close sub menu | function(openKeys: string\[]) |
| select | callback executed when a menu item is selected | function({ item, key, selectedKeys }) |
@@ -54,7 +54,7 @@
| children | sub menus or sub menu items | Array<MenuItem\|SubMenu> | |
| disabled | whether sub menu is disabled or not | boolean | false |
| key | unique id of the sub menu | string | |
-| title | title of the sub menu | string\|ReactNode | |
+| title | title of the sub menu | string\|slot | |
### Menu.SubMenu Events
| Events Name | Description | Arguments |
@@ -66,7 +66,7 @@
| Param | Description | Type | Default value |
| ----- | ----------- | ---- | ------------- |
| children | sub menu items | MenuItem\[] | |
-| title | title of the group | string\|ReactNode | |
+| title | title of the group | string\|slot | |
### Menu.Divider
diff --git a/components/menu/index.zh-CN.md b/components/menu/index.zh-CN.md
index 1b9c65d17..43a449e21 100644
--- a/components/menu/index.zh-CN.md
+++ b/components/menu/index.zh-CN.md
@@ -61,7 +61,7 @@
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
-| title | 分组标题 | string\|\|function|\slot | |
+| title | 分组标题 | string\|\|function\|slot | |
### Menu.Divider
diff --git a/components/popconfirm/index.zh-CN.md b/components/popconfirm/index.zh-CN.md
index 9442b1fac..c45a7a7f4 100644
--- a/components/popconfirm/index.zh-CN.md
+++ b/components/popconfirm/index.zh-CN.md
@@ -27,7 +27,7 @@ title: Popconfirm
| cancel | 点击取消时触发 | (e) |
| confirm | 点击确认时触发 | (e) |
-更多属性请参考 [Tooltip](/components/tooltip/#API)。
+更多属性请参考 [Tooltip](#/cn/components/tooltip/API)。
## 注意
diff --git a/components/popover/index.zh-CN.md b/components/popover/index.zh-CN.md
index 986b670c5..6bcd9d244 100644
--- a/components/popover/index.zh-CN.md
+++ b/components/popover/index.zh-CN.md
@@ -20,7 +20,7 @@ title: Popover
| content | 卡片内容 | string\|function\|slot | 无 |
| title | 卡片标题 | string\|function\|slot | 无 |
-更多属性请参考 [Tooltip](/components/tooltip/#API)。
+更多属性请参考 [Tooltip](#/cn/components/tooltip/API)。
## 注意
diff --git a/components/select/demo/coordinate.md b/components/select/demo/coordinate.md
index 8e6a2d40c..f4d80e7e2 100644
--- a/components/select/demo/coordinate.md
+++ b/components/select/demo/coordinate.md
@@ -2,13 +2,13 @@
#### 联动
省市联动是典型的例子。
-推荐使用 [Cascader](/components/cascader/) 组件。
+推荐使用 [Cascader](#/cn/components/cascader/) 组件。
#### coordinate
Coordinating the selection of provinces and cities is a common use case and demonstrates how selection can be coordinated.
-Using the [Cascader](/components/cascader) component is strongly recommended instead as it is more flexible and capable.
+Using the [Cascader](#/us/components/cascader) component is strongly recommended instead as it is more flexible and capable.
```html
diff --git a/components/tabs/index.zh-CN.md b/components/tabs/index.zh-CN.md
index 197ea63fd..4e5bddc36 100644
--- a/components/tabs/index.zh-CN.md
+++ b/components/tabs/index.zh-CN.md
@@ -16,7 +16,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
- 卡片式的页签,提供可关闭的样式,常用于容器顶部。
- 标准线条式页签,用于容器内部的主功能切换,这是最常用的 Tabs。
-- [RadioButton](/components/radio/#components-radio-demo-radiobutton) 可作为更次级的页签来使用。
+- [RadioButton](#/cn/components/radio/components-radio-demo-radiobutton) 可作为更次级的页签来使用。
## API
diff --git a/components/vc-menu/MenuItemGroup.jsx b/components/vc-menu/MenuItemGroup.jsx
index b4754cf5f..e7f2f6c12 100644
--- a/components/vc-menu/MenuItemGroup.jsx
+++ b/components/vc-menu/MenuItemGroup.jsx
@@ -34,7 +34,7 @@ const MenuItemGroup = {
{getComponentFromProp(this, 'title')}
- {this.$slots.default.map(this.renderInnerMenuItem)}
+ {this.$slots.default && this.$slots.default.map(this.renderInnerMenuItem)}
)
diff --git a/examples/components/demo.vue b/examples/components/demo.vue
index 9e4a58287..72fdf0c5d 100644
--- a/examples/components/demo.vue
+++ b/examples/components/demo.vue
@@ -5,9 +5,40 @@ import zhCN from 'antd/locale-provider/zh_CN'
import enUS from 'antd/locale-provider/default'
export default {
render () {
- const { name, demo } = this.$route.params // eslint-disable-line
+ const { name } = this.$route.params
let { lang } = this.$route.params
- const Demo = AllDemo[name]
+ const titleMap = {}
+ const menuConfig = {
+ General: [],
+ Layout: [],
+ Navigation: [],
+ 'Data Entry': [],
+ 'Data Display': [],
+ Feedback: [],
+ Other: [],
+ }
+ for (const [title, d] of Object.entries(AllDemo)) {
+ const type = d.type || 'Other'
+ const key = `${title.replace(/(\B[A-Z])/g, '-$1').toLowerCase()}`
+ titleMap[key] = title
+ menuConfig[type] = menuConfig[type] || []
+ menuConfig[type].push(d)
+ }
+ const Demo = AllDemo[titleMap[name]]
+ const MenuGroup = []
+ for (const [type, menus] of Object.entries(menuConfig)) {
+ const MenuItems = []
+ menus.forEach(({ title, subtitle }) => {
+ const linkValue = lang === 'cn'
+ ? [{title}, {subtitle}]
+ : [{title}]
+ const key = `${title.replace(/(\B[A-Z])/g, '-$1').toLowerCase()}`
+ MenuItems.push(
+ {linkValue}
+ )
+ })
+ MenuGroup.push({MenuItems})
+ }
let locale = zhCN
if (lang !== 'cn') {
lang = 'us'
@@ -17,16 +48,24 @@ export default {
-
-
- {Object.keys(AllDemo).map(d =>
- {d}
- )}
-
-
- {Demo ? : '正在紧急开发中...'}
-
-
+
+
+
+
+
+
+ {Demo ? : '正在紧急开发中...'}
+
+
+
)
diff --git a/examples/components/header.vue b/examples/components/header.vue
index 73355b417..aee89fb80 100644
--- a/examples/components/header.vue
+++ b/examples/components/header.vue
@@ -1,27 +1,43 @@
-
-
-
diff --git a/examples/index.js b/examples/index.js
index e8d30716e..0c06c48b6 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -1,3 +1,4 @@
+import '../components/style.js'
import './index.less'
import 'highlight.js/styles/solarized-light.css'
import Vue from 'vue'
diff --git a/examples/index.less b/examples/index.less
index 3626d7e9b..7abb49a15 100644
--- a/examples/index.less
+++ b/examples/index.less
@@ -8,9 +8,6 @@
.content {
flex: 1;
}
- #header {
- padding: 0 50px;
- }
.main-wrapper {
display: flex;
flex: 1;