@momo-kits/swipe 0.0.11 → 0.0.18
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 +3 -3
- package/package.json +1 -1
package/Swiper.js
CHANGED
|
@@ -325,7 +325,7 @@ export default class Swiper extends Component {
|
|
|
325
325
|
* Automatic rolling
|
|
326
326
|
*/
|
|
327
327
|
autoplay = () => {
|
|
328
|
-
if (!Array.isArray(this
|
|
328
|
+
if (!Array.isArray(this?.props?.children)
|
|
329
329
|
|| !this.props.autoplay
|
|
330
330
|
|| this.internals.isScrolling
|
|
331
331
|
|| this.state.autoplayEnd) return;
|
|
@@ -579,11 +579,11 @@ export default class Swiper extends Component {
|
|
|
579
579
|
renderTitle = () => {
|
|
580
580
|
const title = child && child.props && child.props.title;
|
|
581
581
|
if(title) return null;
|
|
582
|
-
const child = this
|
|
582
|
+
const child = this?.props?.children[this?.state?.index];
|
|
583
583
|
return title
|
|
584
584
|
? (
|
|
585
585
|
<View style={styles.title}>
|
|
586
|
-
{this
|
|
586
|
+
{this?.props?.children[this.state.index].props.title}
|
|
587
587
|
</View>
|
|
588
588
|
)
|
|
589
589
|
: null;
|