const screenWidth = uni.$u.sys().screenWidth
const screenHeight = uni.$u.sys().screenHeight
const shareHeight = 170
const shareTop = screenHeight - shareHeight
const view = new plus.nativeObj.View('share-view', {
top: '0px',
left: '0px',
width: screenWidth + 'px',
height: screenHeight + 'px',
opacity: 0
}, [{ // 透明蒙版
tag: 'rect',
id: 'upgrade-mark',
rectStyles: { color: 'rgba(0, 0, 0, .3)' },
position: { top: '0px', width: screenWidth + 'px', height: screenHeight + 'px' }
}])
let opacity = 0
function show() {
view.setStyle({ opacity: opacity === 10 ? 1 : parseFloat('0.' + opacity) })
view.show()
if (opacity === 10) return
setTimeout(() => {
console.warn(opacity);
opacity++
show()
}, 50);
}
show()
1 个回复
DCloud_App_Array
提供复现此问题的设备信息。
建议使用uni原生插件或uts插件来实现。