ElemeFE / ElemeFE/element

[Feature Request] loading add timer

Open
#20,731 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name

### Description


获取验证码
{{ times }}s

export default {
data() {
return {
times: 60,
show:true
}
},
methods: {
getCode() {
this.show = false
this.timer = setInterval(()=>{
this.times--
loading = ({
lock: true,
text: 'Loading' this.times,
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
// target: document.querySelector('.app-container')
})
if(this.times===0){
this.show = true
clearInterval(this.timer)
}
},1000)
}
}
}
This way to increase the timer, but the background will become very black, not transparent, can there be a solution, thank you!!!

<!-- generated by https://elementui.github.io/issue-generator DO NOT REMOVE -->

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.