antd design vue 禁止输入中文

         <a-input
              @blur="validateDomainBlur"
              placeholder="请输入需要绑定的域名"
              v-decorator="['domain',
                { rules: [
                    { required: false, message: '请输入域名' },
                  ],
                  getValueFromEvent: (event) => {
                      return event.target.value.replace(/[\u4E00-\u9FA5]/g,'')
                  }
                 }
              ]"
            />
getValueFromEvent: (event) => {
                      return event.target.value.replace(/[\u4E00-\u9FA5]/g,'')    
}
posted @ 2020-03-11 15:27  1点  阅读(2788)  评论(0编辑  收藏  举报