@momo-kits/swipe 0.0.30 → 0.0.33-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Swiper.js +4 -3
- package/package.json +1 -1
package/Swiper.js
CHANGED
|
@@ -577,11 +577,12 @@ export default class Swiper extends Component {
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
renderTitle = () => {
|
|
580
|
-
|
|
580
|
+
let { children = [] } = this.props;
|
|
581
|
+
const child = children[this.state.index];
|
|
581
582
|
const title = child && child.props && child.props.title
|
|
582
|
-
return title ? (
|
|
583
|
+
return !!title ? (
|
|
583
584
|
<View style={styles.title}>
|
|
584
|
-
{this.
|
|
585
|
+
{this.props.children?.[this.state.index].props.title}
|
|
585
586
|
</View>
|
|
586
587
|
) : null
|
|
587
588
|
}
|