countDown (data) {
let secondsToGo = 2
let modal = null
modal = this.$success({
title: '修改成功',
content: '已成功修改信息',
centered: true
})
const interval = setInterval(() => {
secondsToGo -= 1
}, 1000)
setTimeout(() => {
clearInterval(interval)
modal.destroy()
// do something
}, secondsToGo * 1000)
},
网友评论