智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/21/21d8d5f4425a5b6ce6d5f6a4788...

25 lines
460 B

const _isSupport = !!window.navigator.vibrate
export function vibrateLong () {
if (_isSupport && window.navigator.vibrate(400)) {
return {
errMsg: 'vibrateLong:ok'
}
} else {
return {
errMsg: 'vibrateLong:fail'
}
}
}
export function vibrateShort () {
if (_isSupport && window.navigator.vibrate(15)) {
return {
errMsg: 'vibrateShort:ok'
}
} else {
return {
errMsg: 'vibrateShort:fail'
}
}
}