<scroll-view>
可滚动视图区域。
竖向滚动:
- 需要设置属性
scroll-y
- 需要设置
height
为固定值
横向滚动:
- 需要设置属性
scroll-x
- 需要设置
width
为固定值或100% - 需要设置样式
white-space:nowrap;
<button>
对button组件使用 border: none; 无效;
正确做法: button::after{ border: none; }
<switch>
更改switch组件的样式:
.wx-switch-input{
width: 82rpx !important;
height: 36rpx !important;
}
// 未选中状态
.wx-switch-input::before{
width: 80rpx !important;
height: 32rpx !important;
background-color: #6E6E6E !important;
}
// 选中状态
.wx-switch-input::after{
width: 32rpx !important;
height: 32rpx !important;
}
<cover-view>
不支持样式overflow,但是支持overflow-y
cover-view中可以使用button,但是button组件中必须有内容,否则在真机上不会显示
backgroundAudioManager
获取全局唯一的背景音频管理器。
- 当设置新的src时,会自动开始播放。(iPhone须设置title,否则会报错)