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

NameDescriptionTypeDefault
textPrompt text
string
'成功文案'
sizeThe size of the icon
number
cx(40)
textStyleStyle of textnull
iconfontStyleIcon stylenull
contentStyleContent style{}
showIconIs the icon displayed
boolean
true
tuya10:16