//导入toast包
import promptAction from '@ohos.promptAction'
//具体使用
promptAction.showToast({
message:"测试"
})
//还可传入显示时长
promptAction.showToast({
message:"测试",
duration:2000
})
//距离底部位置
promptAction.showToast({
message: "测试",
duration: 3000,
bottom:64
});
鸿蒙:Toast
最新推荐文章于 2025-04-02 14:25:11 发布