computed: {
dataRule: function () {
return {
fCode: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ pattern: /^[^\u4e00-\u9fa5]+$/, message: '不允许输入中文',trigger: 'blur'},
{ pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+$/, message: '不允许输入空格等特殊符号',trigger: 'blur'},
{ pattern: /[0-9a-zA-Z]{1,6}/, message: '只可以输入数字和字母',trigger: 'blur'},
{ min: 1, max: 6, message: '长度在 1 到 6个字符', trigger: 'blur' }
],
fName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
]
}
},