NEZ-2359 feat: web terminal 支持文件上传下载界面开发

This commit is contained in:
zhangyu
2022-11-21 18:40:28 +08:00
parent 100a9d64a0
commit fa8f25fad6
24 changed files with 4513 additions and 261 deletions

View File

@@ -95,6 +95,22 @@ export default {
this.$copyText(txt).then(() => {
this.$message.success({ message: this.$t('overall.copySuccess') })
})
},
animateCSS (node, animation, prefix = 'animate__') {
// We create a Promise and return it
return new Promise((resolve, reject) => {
const animationName = `${prefix}${animation}`
node.classList.add(`${prefix}animated`, animationName)
// When the animation ends, we clean the classes and resolve the Promise
function handleAnimationEnd (event) {
event.stopPropagation()
node.classList.remove(`${prefix}animated`, animationName)
resolve('Animation ended')
}
node.addEventListener('animationend', handleAnimationEnd, { once: true })
})
}
}
}