data: {
show: false,
duration: 300,
position: 'right',
round: true,
overlay: true,
customStyle: '99',
overlayStyle: '999'
},
popup(res){
const position = res.currentTarget.dataset.position
let customStyle = ''
let duration = this.data.duration
switch(position) {
case 'top':
case 'bottom':
customStyle = 'height: 50%;'
break
case 'right':
break
}
customStyle = 'height:50;'
this.setData({
position,
show: true,
customStyle,
duration
})
},
onAfterLeave(res) {
// console.log(res)
},
customStyle = 'height:50vh;'
data: {
show: false,
duration: 300,
position: 'bottom',
round: true,
overlay: true,
customStyle: '',
overlayStyle: ''
},
popup(res){
const position = res.currentTarget.dataset.position
let customStyle = ''
let duration = this.data.duration
switch(position) {
case 'top':
case 'bottom':
customStyle = 'height: 50vh;'
break
case 'right':
break
}
customStyle = 'height: 50vh;'
this.setData({
position,
show: true,
customStyle,
duration
})
},
https://developers.weixin.qq.com/s/c3GKahm37jx4
1、改成position:'bottom'