Captcha

SMS code confirming dialog

Import

import { Captcha } from  'mand-mobile-next'

Vue.createApp().component(Captcha.name, Captcha)

Code Examples

API

Captcha Props

PropsDescriptionTypeDefault
v-modelwhether to show captcha or notBooleanfalse
is-viewwhether to show as inline element or append to the bodyBooleanfalse
maxlengthmaxlength of string, set to -1 as no restrictionNumber4
maskwhether to mask code or notBooleanfalse
systemUse system keyboard or simulated keyboardBooleanfalse
auto-sendwhether the send event is triggered during the first display, otherwise you need to manually click the send buttonBooleantrue
auto-countdownwhether to automatically start the countdown after manually clicking the send button, otherwise you need to manually call countdownBooleantrue
title-String-
brief-String-
append-toportal node of dialogHTML Elementdocument.body
countcounter duration, set as 0 to hide resend buttonNumber60
count-normal-texttext of send verification code buttonString发送验证码
count-active-texttext of send verification code button in countdown stateString{$1}秒后重发

Captcha Methods

countdown()

Start the time counter

resetcount()

Reset the time counter

setError(message)

Set and show error message

Captcha Events

@show()

Invoked when captcha is shown

@hide()

Invoked when captcha is hidden

@send(countdown)

Invoked when user clicks resend button. The first time you open or click the reissue button triggers and starts the countdown. If auto-countdown is false, you need to manually call countdown.

@submit(code)

Invoked when user submits