• "图片验证码"组件:<vcode> —— 快应用组件库H-UI


    空值时自动校验:

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

    验证码输入正确时:

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

    <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>
    

    扫码体验

  • 相关阅读:
    微信支付的安全漏洞之XXE
    IP地址分类(A类 B类 C类 D类 E类)
    MySql新增表的字段,删除表字段
    Java基础之中间件的初识
    Java基础之IO框架
    微信H5支付坑一--手续费未结算
    设计模式之简单工厂模式
    nginx负载均衡的5种策略(转载)
    Mybatis注意点之#与$区别
    RSF 分布式 RPC 服务框架的分层设计
  • 原文地址:https://www.cnblogs.com/cloud-dev/p/tu-pian-yan-zheng-mazu-jianltvcodegt--kuai-ying-yo.html
Copyright © 2020-2023  润新知