wx.setScreenBrightness(OBJECT)

设置屏幕亮度。

OBJECT参数说明:

参数 类型 必填 说明
value Number 屏幕亮度值,范围 0~1,0 最暗,1 最亮
success Function 接口调用成功
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)
 


// 保持屏幕常亮 wx.setKeepScreenOn({ keepScreenOn: true })

 

  

// 设置屏幕亮度为最暗
 wx.setScreenBrightness({
 value: 0
 })

 

相关文章:

  • 2021-05-01
  • 2021-06-12
  • 2022-12-23
  • 2022-02-09
  • 2021-04-24
  • 2021-05-12
  • 2022-01-07
猜你喜欢
  • 2021-08-24
  • 2021-06-08
  • 2022-12-23
  • 2021-05-02
  • 2022-01-07
  • 2021-12-26
  • 2021-12-12
相关资源
相似解决方案