example(captcha): fix demo verify captcha too fast
This commit is contained in:
		
							parent
							
								
									68fac32005
								
							
						
					
					
						commit
						f5fccb25d8
					
				| 
						 | 
				
			
			@ -101,6 +101,7 @@ export default {
 | 
			
		|||
    },
 | 
			
		||||
    submit(val) {
 | 
			
		||||
      const max = parseFloat(this.maxlength)
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        if (!this.limit || max < 0 || val.length === max) {
 | 
			
		||||
          if (val !== '1234') {
 | 
			
		||||
            this.$refs.captcha.setError('验证码错误,请重新输入')
 | 
			
		||||
| 
						 | 
				
			
			@ -111,6 +112,7 @@ export default {
 | 
			
		|||
            })
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }, 300)
 | 
			
		||||
    },
 | 
			
		||||
    onSend() {
 | 
			
		||||
      console.log('click resend button.')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue