[fix 87814] 标签管理-输入框去除前后空格
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
<!--展示区域-->
|
<!--展示区域-->
|
||||||
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
<a-form-model-item :label="$t('system.tag.showArea')" prop="showArea">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="model.showArea"
|
v-model.trim="model.showArea"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.showArea')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.showArea')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="enName">
|
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="enName">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="model.enName"
|
v-model.trim="model.enName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -91,18 +91,19 @@ export default {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||||
trigger: 'change'
|
trigger: 'blur'
|
||||||
},
|
},
|
||||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
// { max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||||
{ validator: this.test }
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
// 展示区域
|
// 展示区域
|
||||||
showArea: [
|
showArea: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.showArea'), trigger: 'blur' },
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.showArea'), trigger: 'blur' },
|
||||||
{ min: 1, max: 50, message: this.$t('charactersLength'), trigger: 'blur' }
|
// { min: 1, max: 50, message: this.$t('charactersLength'), trigger: 'blur' }
|
||||||
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
sort: [
|
sort: [
|
||||||
{ required: false, message: this.$t('enterSortingNumber'), trigger: 'change' }
|
{ required: false, message: this.$t('enterSortingNumber'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
moduleArr: TagsTypeEnums.getItemList()
|
moduleArr: TagsTypeEnums.getItemList()
|
||||||
@@ -156,6 +157,14 @@ export default {
|
|||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$refs.form && this.$refs.form.resetFields()
|
this.$refs.form && this.$refs.form.resetFields()
|
||||||
|
},
|
||||||
|
test (rule, value, callback) {
|
||||||
|
var money = /[,]|[,]/g
|
||||||
|
if (money.test(value)) {
|
||||||
|
callback(new Error(this.$t('disableInput') + ','))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,14 +38,14 @@
|
|||||||
<!-- 属性名称-->
|
<!-- 属性名称-->
|
||||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
v-model.trim="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!-- 英文名称-->
|
<!-- 英文名称-->
|
||||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldEnName"
|
v-model.trim="form.dbFieldEnName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<a-col :span="24" v-if="canOpeFlag">
|
<a-col :span="24" v-if="canOpeFlag">
|
||||||
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
|
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldName"
|
v-model.trim="form.dbFieldName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
|
||||||
:maxLength="120"
|
:maxLength="120"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -203,7 +203,7 @@ export default {
|
|||||||
// 属性名称
|
// 属性名称
|
||||||
dbFieldTxt: [
|
dbFieldTxt: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeName'), trigger: 'blur' },
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('system.tag.attributeName'), trigger: 'blur' },
|
||||||
{ min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
// { min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
|
||||||
{ validator: this.test }
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
// 字段名称
|
// 字段名称
|
||||||
@@ -219,7 +219,7 @@ export default {
|
|||||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
},
|
},
|
||||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
// { max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||||
{ validator: this.test }
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
// 属性类型
|
// 属性类型
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
<a-form-model-item :label="$t('system.tag.attributeName')" prop="dbFieldTxt">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
v-model.trim="form.dbFieldTxt" :placeholder="$t('pleaseEnter') + $t('system.tag.attributeName')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
<a-form-model-item :label="$t('system.tag.attributeNameEnglish')" prop="dbFieldEnName">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldEnName"
|
v-model.trim="form.dbFieldEnName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.attributeNameEnglish')"
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<a-col :span="24" v-if="canOpeFlag">
|
<a-col :span="24" v-if="canOpeFlag">
|
||||||
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
|
<a-form-model-item :label="$t('system.tag.fieldName')" prop="dbFieldName">
|
||||||
<a-input
|
<a-input
|
||||||
v-model="form.dbFieldName"
|
v-model.trim="form.dbFieldName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.fieldName')"
|
||||||
:maxLength="60"
|
:maxLength="60"
|
||||||
></a-input>
|
></a-input>
|
||||||
@@ -249,7 +249,7 @@ export default {
|
|||||||
|
|
||||||
dbFieldName: [
|
dbFieldName: [
|
||||||
{ required: false, message: this.$t('system.tag.pleaseEnterYourEnglishName'), trigger: 'blur' },
|
{ required: false, message: this.$t('system.tag.pleaseEnterYourEnglishName'), trigger: 'blur' },
|
||||||
{ min: 1, max: 60, message: this.$t('cantExeed') + '60' + this.$t('characters'), trigger: 'blur' },
|
// { min: 1, max: 60, message: this.$t('cantExeed') + '60' + this.$t('characters'), trigger: 'blur' },
|
||||||
{ validator: this.test }
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
// 英文名称
|
// 英文名称
|
||||||
@@ -259,7 +259,7 @@ export default {
|
|||||||
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
message: this.$t('pleaseEnter') + this.$t('system.tag.attributeNameEnglish'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
},
|
},
|
||||||
{ max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
// { max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' },
|
||||||
{ validator: this.test }
|
{ validator: this.test }
|
||||||
],
|
],
|
||||||
// 属性类型
|
// 属性类型
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<a-form-model-item :label="$t('system.tag.labelItemName')" prop="dictName" class="tag-item">
|
<a-form-model-item :label="$t('system.tag.labelItemName')" prop="dictName" class="tag-item">
|
||||||
<a-input
|
<a-input
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-model="model.dictName"
|
v-model.trim="model.dictName"
|
||||||
:placeholder="$t('pleaseEnter') + $t('system.tag.labelItemName')"
|
:placeholder="$t('pleaseEnter') + $t('system.tag.labelItemName')"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<a-input
|
<a-input
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
:placeholder="$t('pleaseEnter') + $t('dict.dictionaryNumber')"
|
:placeholder="$t('pleaseEnter') + $t('dict.dictionaryNumber')"
|
||||||
v-model="model.dictCode"
|
v-model.trim="model.dictCode"
|
||||||
/>
|
/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<!--展示顺序-->
|
<!--展示顺序-->
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
],
|
],
|
||||||
// 字典编码
|
// 字典编码
|
||||||
dictCode: [
|
dictCode: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('dict.dictionaryNumber') },
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('dict.dictionaryNumber'), trigger: 'blur' },
|
||||||
{ validator: this.validateDictCode }],
|
{ validator: this.validateDictCode }],
|
||||||
// 展示顺序
|
// 展示顺序
|
||||||
orderNum: [
|
orderNum: [
|
||||||
|
|||||||
Reference in New Issue
Block a user