diff --git a/src/components/TagSelect/demo/expandable.md b/src/components/TagSelect/demo/expandable.md index 72df4e828174310d9facfeda1649b74385ef8924..34f804a3f95ca1c5e71093d12e28a64ccdaa62f5 100644 --- a/src/components/TagSelect/demo/expandable.md +++ b/src/components/TagSelect/demo/expandable.md @@ -15,7 +15,7 @@ function handleFormSubmit(checkedValue) { } ReactDOM.render( - + 类目一 类目二 类目三 diff --git a/src/components/TagSelect/index.js b/src/components/TagSelect/index.js index 620171430ffb7f9c1d143407bd9d55f3a9ef7b7b..498f33c969293d72167244d93ebd1ba1b9cbec6f 100644 --- a/src/components/TagSelect/index.js +++ b/src/components/TagSelect/index.js @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react'; +import React, { Component } from 'react'; import classNames from 'classnames'; import { Tag, Icon } from 'antd'; @@ -19,7 +19,7 @@ TagSelectOption.defaultProps = { displayName: 'TagSelectOption', }; -class TagSelect extends PureComponent { +class TagSelect extends Component { static defaultProps = { initialValue: [], }; @@ -103,7 +103,7 @@ class TagSelect extends PureComponent { 全部 { - children.filter(child => child.props.displayName === 'TagSelectOption').map(child => React.cloneElement(child, { + checkedTags && children.filter(child => child.props.displayName === 'TagSelectOption').map(child => React.cloneElement(child, { key: `tag-select-${child.props.value}`, checked: checkedTags.indexOf(child.props.value) > -1, onChange: this.handleTagChange, diff --git a/src/components/TagSelect/index.less b/src/components/TagSelect/index.less index ae1941fb8b65b3b330701ee111fb4ebed3b26763..7311cd88fbd09e33f81c74de8eefe5cf7cf7a62b 100644 --- a/src/components/TagSelect/index.less +++ b/src/components/TagSelect/index.less @@ -7,6 +7,7 @@ position: relative; overflow: hidden; max-height: 32px; + line-height: 32px; transition: all .3s; :global { .ant-tag { diff --git a/src/components/Trend/index.md b/src/components/Trend/index.md index 7948bf43c3ddcb760732ed6ff4cc499170d3986c..ea86120314c5f308808c052acc18178dbf09ccfe 100644 --- a/src/components/Trend/index.md +++ b/src/components/Trend/index.md @@ -5,7 +5,7 @@ cols: 1 order: 14 --- -趋势符号,标记上升和下降状态。 +趋势符号,标记上升和下降趋势。 ## API