zoukankan      html  css  js  c++  java
  • 动态表单数据验证 vue

    idCard: [{ validator: (rule, value, callback) => {
              if (this.idCardVif === 'idCard') {
                this.validateIdCard(rule, value, callback)
              } else {
                this.validRequired(rule, value, callback)
              }
            },
    <tcHeader required width="100px">证件号码</tcHeader>
                  <FormItem prop="idCard"></FormItem>
                  <!--<FormItem prop="idCardInput" class="idCardInput" v-if="idCardVif === 'idCardInput'"></FormItem>-->
                  <tcContent style=" calc(100% - 100px);">
                    <inputZen max
                              v-if="idCardVif === 'idCardInput'"
                              @on-blur="valiFormItemHandle('idCard')"
                              v-model="formData.idCard" placeholder="" :maxlength="50"/>
    
                    <id-card
                      v-if="idCardVif === 'idCard'"
                      @on-change="valiFormItemHandle('idCard')"
                      v-model="formData.idCard"
                      border="border-0"></id-card>
                  </tcContent>
    data () {
        return {
          idCardVif: 'idCard', // 身份证组件 和 input 组件 来回切换 idCard idCardInput
  • 相关阅读:
    洛朗级数
    泰勒级数
    中心极限定理
    置信区间公式
    简单随机样本的性质
    极大似然估计
    矩估计法
    摆摊70
    天天去哪吃
    天天和树
  • 原文地址:https://www.cnblogs.com/pengchenggang/p/11328405.html
Copyright © 2011-2022 走看看