qcloud-iotexplorer-h5-panel-sdk
Advanced tools
Comparing version 1.2.6 to 1.2.7
{ | ||
"name": "qcloud-iotexplorer-h5-panel-sdk", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/release/qcloud-iotexplorer-h5-panel-sdk", |
@@ -115,6 +115,13 @@ # (DEPRECATED) qcloud-iotexplorer-h5-panel-sdk | ||
### sdk.setAutoTriggerVibrateShort(autoTriggerVibrateShort: boolean, autoTriggerVibrateShortType: 'heavy' | 'medium' | 'light') => void; | ||
### sdk.setTriggerVibrateShortFilter(filter: (property) => boolean, { vibrateShortType: 'heavy' | 'medium' | 'light' }) => void; | ||
设置是否自动触发震动,若设置为true,则每次调用 controlDeviceData 中含有 bool 类型的物模型变化时,会自动触发一次震动 | ||
设置需要触发震动的物模型filter,当调用 controlDeviceData 时,会将变换的所有属性的物模型依次调用 filter 函数,当 filter 返回 true 时则会触发一次震动,如: | ||
``` | ||
sdk.setTriggerVibrateShortFilter((property) => { | ||
// 当变更的属性的物模型类型是 bool 类型且 id = 'power_switch' 时,触发一次震动 | ||
return property.define.type === 'bool' && property.id === 'power_switch'; | ||
}, { vibrateShortType: 'heavy' }); | ||
``` | ||
### sdk.requestTokenApi: (action, data, options) => Promise | ||
@@ -121,0 +128,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
301220
879