mochixuan / react-native-smart-tip

🔥🔥🔥Toast , SnackBar , Modal , Show Toast above Modal
247 stars 37 forks source link

点击没有反应 #12

Closed Pisces-Fool closed 4 years ago

Pisces-Fool commented 4 years ago

image 大佬,您好。我是直接把您的demo里的拿过来,但是没有效果也。是我少了什么吗,打过断点,Toast确实有这个对象,引用到了。但是就是没有tip弹出。

mochixuan commented 4 years ago

import {WToast} from 'react-native-smart-tip'

// Base show = () => { WToast.show({data: 'hello world'}) }

// Other show = () => { const toastOpts = { data: 'Success', textColor: '#ffffff', backgroundColor: '#444444', duration: WToast.duration.LONG, //1.SHORT 2.LONG position: WToast.position.TOP, // 1.TOP 2.CENTER 3.BOTTOM icon: <Image source={require('../data/img/success.png')} style={{width: 32,height: 32,resizeMode: 'contain'}}/> }

WToast.show(toastOpts)

} 你可以看下我的先看看能不能显示。如果能,那可能是你参数问题。