@antmove/wx-alipay
Version:
transform wechat miniprogram to alipay miniprogram tool.
26 lines (25 loc) • 462 B
JavaScript
Component({
props: {
hidden: true,
duration: 1500,
textContent: '',
onLoadChange: () => { },
},
methods: {
watchHidden() {
const num = Number(this.props.duration)
if (!this.props.hidden) {
const that = this
setTimeout(() => {
const e = {
type: 'change',
}
that.props.onLoadChange(e)
}, num)
}
},
},
didUpdate() {
this.watchHidden()
},
})