GlobalToast
GlobalToast
is a global prompt attached to FullView with fade-in and fade-out animation effects.
Code demo
Basic Usage
import { GlobalToast } from 'tuya-panel-kit'GlobalToast.show({text: 'Suggestions for suggestive copywriting display up to 16 characters',showIcon: false,contentStyle: {},onFinish: () => {console.log('Toast finished');GlobalToast.hide();},});
加载使用
import { GlobalToast } from 'tuya-panel-kit'GlobalToast.show({text: 'Set successfully',onFinish: () => {console.log('Toast finished');GlobalToast.hide();},});
API
Name | Description | Type | Default |
---|---|---|---|
text | Prompt text | string | '成功文案' |
size | The size of the icon | number | cx(40) |
textStyle | Style of text | null | |
iconfontStyle | Icon style | null | |
contentStyle | Content style | {} | |
showIcon | Is the icon displayed | boolean | true |