[Feature Request] loading add timer
- 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.