diff --git a/src/components/AvatarList/index.d.ts b/src/components/AvatarList/index.d.ts index 0f85f4ed21fbf8a8cce1fc058019975b2678ab15..a6ca98ad2ce643ccae26306335b97c6343d6bd55 100644 --- a/src/components/AvatarList/index.d.ts +++ b/src/components/AvatarList/index.d.ts @@ -1,6 +1,6 @@ import React from "react"; export interface AvatarItemProps { - tips: string | React.ReactNode; + tips: React.ReactNode; src: string; } diff --git a/src/components/TagSelect/index.js b/src/components/TagSelect/index.js index 1c89296571afcdb22eb45cf65c9a93788de65f6e..5ce156934f21f229179caf6d96600af7af0156ce 100644 --- a/src/components/TagSelect/index.js +++ b/src/components/TagSelect/index.js @@ -39,7 +39,8 @@ class TagSelect extends Component { } getAllTags() { - const { children } = this.props; + let { children } = this.props; + children = React.Children.toArray(children); const checkedTags = children .filter(child => this.isTagSelectOption(child)) .map(child => child.props.value); @@ -86,7 +87,6 @@ class TagSelect extends Component { [styles.hasExpandTag]: expandable, [styles.expanded]: expand, }); - return (