Skip to content

qin.setBackgroundColor(OBJECT) ​

动态设置窗口的背景色。

平台差异说明

H5微信小程序小红书小程序抖音小程序快手小程序
x√√x√

参数说明

属性类型默认值必填说明
backgroundColorString否窗口的背景色,必须为十六进制颜色值
backgroundColorTopString否顶部窗口的背景色,必须为十六进制颜色值,仅 iOS 支持
backgroundColorBottomString否底部窗口的背景色,必须为十六进制颜色值,仅 iOS 支持
successFunction否接口调用成功的回调函数
failFunction否接口调用失败的回调函数
completeFunction否接口调用结束的回调函数(调用成功、失败都会执行)

代码示例

js
qin.setBackgroundColor({
  backgroundColor: '#ffffff',
  backgroundColorTop: '#222222',
  backgroundColorBottom: '#333333',
});
qin.setBackgroundColor({
  backgroundColor: '#ffffff',
  backgroundColorTop: '#222222',
  backgroundColorBottom: '#333333',
});

qin.setBackgroundTextStyle(OBJECT) ​

动态设置下拉背景字体、 loading 图的样式。

平台差异说明

|H5|微信小程序|小红书小程序|抖音小程序|快手小程序| |:-😐:-😐:-😐:-😐:-😐:-😐 |x|√|√|x|√|

参数说明

属性类型必填说明
textStyleString是下拉背景字体、 loading 图的样式,值为: dark 、 light
successFunction否接口调用成功的回调函数
failFunction否接口调用失败的回调函数
completeFunction否接口调用结束的回调函数(调用成功、失败都会执行)

代码示例

js
qin.setBackgroundTextStyle({
  // 下拉背景字体、loading 图的样式为 dark
  textStyle: 'dark',
});
qin.setBackgroundTextStyle({
  // 下拉背景字体、loading 图的样式为 dark
  textStyle: 'dark',
});