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!!!
2条答案
按热度按时间5sxhfpxr1#
Translation of this issue:
Existing Component
no
Component Name
nothing
Description
< button V-IF = "show" @ Click = "getcode" > get verification code < / button >
{{ times }}s
ifmq2ha22#
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.