未验证 提交 07687a1e 编写于 作者: L LiAn 提交者: Gitee

update zh-cn/application-dev/device/vibrator-guidelines.md.

Signed-off-by: NLiAn <lian15@huawei.com>
上级 b578acca
......@@ -63,7 +63,7 @@
import vibrator from "@ohos.vibrator"
vibrator.vibrate(duration: number).then((error)=>{
if(error){//调用失败,打印error.code和error.message
console.log("Promise return faild.error.code"+error.code+"error.message"+error.message);
console.log("Promise return failed.error.code"+error.code+"error.message"+error.message);
}else{//调用成功,设备开始振动
console.log("Promise returned to indicate a successful vibration.")
};
......@@ -76,7 +76,7 @@
import vibrator from "@ohos.vibrator"
vibrator.stop(stopMode: VibratorStopMode).then((error)=>{
if(error){//调用失败,打印error.code和error.message
console.log(“Promise return faild.error.code”+error.code+“error.message”+error.message);
console.log(“Promise return failed.error.code”+error.code+“error.message”+error.message);
}else{//调用成功,设备停止振动
Console.log(“Promise returned to indicate successful.”);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册