众所周知Android中Toast使用很简单
Toast.makeText(this, "msg", Toast.LENGTH_SHORT).show();
那么迁移到HarmonyOS如何使用
//导入toast包
import promptAction from '@ohos.promptAction'
//具体使用
promptAction.showToast({
message:"测试"
})
//还可传入显示时长
promptAction.showToast({
message:"测试",
duration:2000
})