diff --git a/components/cascader/index.jsx b/components/cascader/index.jsx index 690da1f8a0..bf921e6b38 100644 --- a/components/cascader/index.jsx +++ b/components/cascader/index.jsx @@ -13,9 +13,7 @@ export default class Cascader extends React.Component { popupPlacement: 'bottomLeft', onChange() {}, options: [], - displayRender(label) { - return label.join(' / '); - }, + displayRender: label => label.join(' / '), disabled: false, allowClear: true, onPopupVisibleChange() {}, diff --git a/components/cascader/index.md b/components/cascader/index.md index 1857abff10..d6454068fe 100644 --- a/components/cascader/index.md +++ b/components/cascader/index.md @@ -27,7 +27,7 @@ | defaultValue | 默认的选中项 | array |[] | | value | 指定选中项 | array | - | | onChange | 选择完成后的回调 | `function(value, selectedOptions)` | - | -| displayRender | 选择后展示的渲染函数 | `function(label)`` | `function(label) { return label.join(' / ') }` | +| displayRender | 选择后展示的渲染函数 | `function(label)`` | `label => label.join(' / ')` | | style | 自定义样式 | string | - | | className | 自定义类名 | string | - | | popupClassName | 自定义浮层类名 | string | - |