小程序初始提交
This commit is contained in:
11
cool-unix/uni_modules/cool-vibrate/utssdk/web/index.uts
Normal file
11
cool-unix/uni_modules/cool-vibrate/utssdk/web/index.uts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 震动
|
||||
* @param {number} duration 震动时间单位ms,ios微信失效
|
||||
*/
|
||||
export function vibrate(duration: number) {
|
||||
try {
|
||||
navigator.vibrate(duration);
|
||||
} catch (error) {
|
||||
console.error("WEB震动失败:", error);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user