赞
踩
众所周知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
})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。