EP-WachatApp/eaterplanet_ecommerce/pages/index/test.wxs

16 lines
436 B
Plaintext
Raw Normal View History

2023-03-24 11:26:36 +08:00
var funcA = function (e, ins) {
// console.log('source is', JSON.stringify(e))
var scrollTop = e.detail.scrollTop
if (scrollTop > 600) {
ins.selectComponent('.group').setStyle({
"background-color": 'rgba(77, 158, 233, 1)'
})
} else {
ins.selectComponent('.group').setStyle({
"background-color": 'rgba(77, 158, 233, ' + Math.max(0, (scrollTop) / 600) + ')'
})
}
}
module.exports = {
funcA: funcA
}