空值时自动校验:

验证码输入错误时自动校验:

验证码输入正确时:

点击验证码可产生一个新验证码,输入忽略大小写:

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode1" params="{{params}}"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode2" params="{{params}}" form-horizontal="true"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode3" params="{{params}}" no-border="true" ></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode4" params="{{params}}" title="none"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode5" params="{{params}}" placeholder="none"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode6" params="{{params}}" tip="请输入右图上的六位字母和数字。"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode7" params="{{params}}" align-right="true"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>


<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode9" params="{{params}}" valid="has-success"></vcode>
<vcode id="vcode10" params="{{params}}" valid="has-warning"></vcode>
<vcode id="vcode11" params="{{params}}" valid="has-error"></vcode>
<vcode id="vcode9_2" params="{{params}}" valid="has-success" valid-icon="none"></vcode>
<vcode id="vcode10_2" params="{{params}}" valid="has-warning" valid-icon="none"></vcode>
<vcode id="vcode11_2" params="{{params}}" valid="has-error" valid-icon="none"></vcode>
<vcode id="vcode12" params="{{params}}" valid="has-success" form-horizontal="true"></vcode>
<vcode id="vcode13" params="{{params}}" valid="has-warning" form-horizontal="true"></vcode>
<vcode id="vcode14" params="{{params}}" valid="has-error" form-horizontal="true"></vcode>
<vcode id="vcode12_2" params="{{params}}" valid="has-success" form-horizontal="true" valid-icon="none"></vcode>
<vcode id="vcode13_2" params="{{params}}" valid="has-warning" form-horizontal="true" valid-icon="none"></vcode>
<vcode id="vcode14_2" params="{{params}}" valid="has-error" form-horizontal="true" valid-icon="none"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode15" params="{{params}}" valid="has-error" form-error="验证码不正确!" value="e3ftdd"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
export default {
private: {
params: {}
}
}
</script>

<import name="form" src="../Common/ui/h-ui/form/c_form"></import>
<import name="vcode" src="../Common/ui/h-ui/form/c_vcode"></import>
<template>
<div class="container">
<form>
<vcode id="vcode16" params="{{params}}"></vcode>
</form>
</div>
</template>
<style lang="less">
@import '../Common/styles/container.less';
</style>
<script>
import prompt from '@system.prompt'
export default {
private: {
params: {}
},
onInit() {
this.$on('vcode16_dispatchEvt',this.dispatchEvt)
},
dispatchEvt(evt) {
// 弹窗显示详细说明
prompt.showToast({
message: evt.detail.value,
duration: 1,
gravity: 'top'
})
}
}
</script>
扫码体验