没有提示文字时prompt不显示 review by 草莓
Showing
1 changed file
with
5 additions
and
0 deletions
@@ -99,6 +99,11 @@ export default class Prompt extends Component { | @@ -99,6 +99,11 @@ export default class Prompt extends Component { | ||
99 | marginBottom: 15, | 99 | marginBottom: 15, |
100 | }, | 100 | }, |
101 | }); | 101 | }); |
102 | + if (!this.props.icon) { | ||
103 | + if (!this.props.text) { | ||
104 | + return null; | ||
105 | + } | ||
106 | + } | ||
102 | 107 | ||
103 | return ( | 108 | return ( |
104 | <Animated.View style={[styles.container, {opacity: this.state.fadeAnim,}]}> | 109 | <Animated.View style={[styles.container, {opacity: this.state.fadeAnim,}]}> |
-
Please register or login to post a comment