dlt.vibrateShort
Introduction
Causes the phone to vibrate for a short duration (15 ms).
Usage Restrictions
Supported on basic library version 4.0.0 or higher.
Parameters
Object object
Property | Type | Default Value | Required | Description |
---|---|---|---|---|
type | string | Yes | Vibration intensity type, valid values are: heavy, medium, light | |
success | function | No | Callback function executed when the interface call is successful | |
fail | function | No | Callback function executed when the interface call fails | |
complete | function | No | Callback function executed when the interface call ends (executed regardless of success or failure) |
Sample Code
// pages/index/index.js
Page({
vibrateShort() {
dlt.vibrateShort({
type: 'heavy',
success: function (res) {},
fail: function (res) {},
complete: function (res) {},
});
},
});