#HarmonyOS:@ohos.promptAction (弹窗)---onProgressChange

组件实例

@ohos.promptAction (弹窗)

导入模块
ts 复制代码
import promptAction from '@ohos.promptAction'
示例
ts 复制代码
try {
  promptAction.showToast({            
    message: 'Message Info',
    duration: 2000, 
    bottom: 64 //  设置弹窗边框距离屏幕底部的位置
  });
} catch (error) {
  console.error(`showToast args error code is ${error.code}, message is ${error.message}`);
};

onProgressChange

网页加载进度变化时触发该回调。

语法
ts 复制代码
onProgressChange(callback: (event?: { newProgress: number }) => void)
相关推荐
KevinChaos15 小时前
阳台小花园开发手记 01|HarmonyOS 7.0 互动卡片:小花园为何要两套界面
华为·harmonyos
Ranger092915 小时前
下一代鸿蒙打包工具链:arkdown
harmonyos
程序猿追18 小时前
一个工程面向手机与二合一:HarmonyOS 6 部署配置和本地手记
华为·智能手机·harmonyos
行者-全栈开发1 天前
【鸿蒙心迹】深色模式适配全链路——从配置到自定义(HarmonyOS 7.x)
华为·harmonyos
行者-全栈开发2 天前
【鸿蒙心迹】国际化 i18n 与多语言资源管理实战(HarmonyOS 7.x)
ui·华为·重构·国际化·harmonyos·多语言
OH_TPC2 天前
HarmonyOS APP开发---"云客服"远程视频客服App,需要用到这个库
harmonyos
逆回2 天前
给鸿蒙手机做一只 3D 宠物:五个把我卡住的问题
harmonyos
钉先生贾2 天前
性能、体积与稳定性:怎样写出可信的适配结论
华为·harmonyos
笑 总不会犯错3 天前
摆脱多端数据撕裂,鸿蒙分布式数据库同步与冲突合并
harmonyos
用户117910488333 天前
鸿蒙签名失败不是玄学:5 个证据点把 hapsigntool 一次排通 GitHub:swsgbl/hmharness
开源·ai编程·harmonyos