Commit 7f96f609 authored by nikogu's avatar nikogu

fix TagSelect demo & line-height

parent df6ecfb4
......@@ -15,7 +15,7 @@ function handleFormSubmit(checkedValue) {
}
ReactDOM.render(
<TagSelect onChange={handleFormSubmit}>
<TagSelect onChange={handleFormSubmit} expandable>
<TagSelect.Option value="cat1">类目一</TagSelect.Option>
<TagSelect.Option value="cat2">类目二</TagSelect.Option>
<TagSelect.Option value="cat3">类目三</TagSelect.Option>
......
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 {
全部
</CheckableTag>
{
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,
......
......@@ -7,6 +7,7 @@
position: relative;
overflow: hidden;
max-height: 32px;
line-height: 32px;
transition: all .3s;
:global {
.ant-tag {
......
......@@ -5,7 +5,7 @@ cols: 1
order: 14
---
趋势符号,标记上升和下降状态
趋势符号,标记上升和下降趋势
## API
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment