Browse Source

style: update code style

pull/3863/head
Benjy Cui 8 years ago
parent
commit
e2b6054cc4
  1. 4
      components/input/Group.tsx
  2. 11
      components/input/Input.tsx
  3. 16
      components/tree/demo/search.md

4
components/input/Group.tsx

@ -24,8 +24,4 @@ const Group: React.StatelessComponent<GroupProps> = (props) => {
);
};
Group.propTypes = {
children: React.PropTypes.any,
};
export default Group;

11
components/input/Input.tsx

@ -85,16 +85,12 @@ export default class Input extends Component<InputProps, any> {
nextFrameActionId: number;
refs: {
[key: string]: any;
input: any;
};
constructor(props) {
super(props);
this.state = {
textareaStyles: null,
};
}
state = {
textareaStyles: null,
};
componentDidMount() {
this.resizeTextarea();
@ -173,7 +169,6 @@ export default class Input extends Component<InputProps, any> {
renderInput() {
const props = assign({}, this.props);
// Fix https://fb.me/react-unknown-prop
const otherProps = omit(this.props, [
'prefixCls',

16
components/tree/demo/search.md

@ -111,13 +111,13 @@ class SearchTree extends React.Component {
const index = item.key.search(searchValue);
const beforeStr = item.key.substr(0, index);
const afterStr = item.key.substr(index + searchValue.length);
const title = index > -1 ?
<span>
{beforeStr}
<span className="ant-tree-searchable-filter">{searchValue}</span>
{afterStr}
</span>
: <span>{item.key}</span>;
const title = index > -1 ? (
<span>
{beforeStr}
<span className="ant-tree-searchable-filter">{searchValue}</span>
{afterStr}
</span>
) : <span>{item.key}</span>;
if (item.children) {
return (
<TreeNode key={item.key} title={title}>
@ -153,4 +153,4 @@ ReactDOM.render(<SearchTree />, mountNode);
color: #f50;
transition: all .3s ease;
}
````
````

Loading…
Cancel
Save