Skip to main content

短震动

vibrateShort

使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效

参数说明

属性类型默认值是否必填描述
typestringmedium震动强度类型,有效值为:heavy、medium、light
successfunction接口调用成功的回调函数
failfunction接口调用失败的回调函数
completefunction接口调用结束的回调函数(调用成功、失败都会执行)

示例代码

dsBridge.call(
'vibrateShort',
{
type: 'heavy',
success (res) {
// 参照返回结果示例
console.log(JSON.stringify(res))
}
}
)