# hapticFeedback
触发手机震动
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Number | N | 属性:intensity: {Type: Number, Default: 1 /2 /3 ,Description: 1、2、3表示震动强度( 1 强度最小,3 强度较大)} | 请求参数 |
# 接口调用示例
const intensity=1
this.$bridge
.hapticFeedback(intensity)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
tip
intensity
字段可省略,表示震动强度最大 (包括iPhone 7 以及以上的机型才支持配置参数调整强度大小)