xiaoxiaoxiao1 icon indicating copy to clipboard operation
xiaoxiaoxiao1 copied to clipboard

只能使用一次

Open tianyong2 opened this issue 8 years ago • 1 comments

第一次点击弹出toast,再次点击就没用了

tianyong2 avatar Feb 04 '17 02:02 tianyong2

WeToast.prototype.hide = function() {
    let page = this.__page
    
    clearTimeout(this.__timeout)

    if (!page.data.__wetoast__.reveal) {
        return
    }
    
    let animation = wx.createAnimation()
    animation.opacity(0).step()
    page.setData({
        '__wetoast__.animationData': animation.export(),
        '__wetoast__.reveal': false //这里加一行
    })
    
    setTimeout(() => {
        page.setData({
            __wetoast__: {}
        })
    }, 400)
}

ciming avatar Feb 08 '17 02:02 ciming