[update] 52757
This commit is contained in:
@@ -52,7 +52,9 @@
|
|||||||
<j-dict-select-tag type="list" v-model="form.attributeType" dictCode="attribute_type"
|
<j-dict-select-tag type="list" v-model="form.attributeType" dictCode="attribute_type"
|
||||||
:placeholder="$t('PleaseSelectLabelType')"/>
|
:placeholder="$t('PleaseSelectLabelType')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum" class="tag-item">
|
||||||
|
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :formatter="limitNumber" :parser="limitNumber" />
|
||||||
|
</a-form-model-item>
|
||||||
<a-form-model-item ref="describe" :label="$t('describe')" prop="description" class="tag-item">
|
<a-form-model-item ref="describe" :label="$t('describe')" prop="description" class="tag-item">
|
||||||
<a-input
|
<a-input
|
||||||
v-model.trim="form.description"
|
v-model.trim="form.description"
|
||||||
@@ -154,6 +156,12 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 300
|
width: 300
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('DisplayOrder'),
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'orderNum'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
@@ -172,6 +180,9 @@
|
|||||||
{ required: true, message: this.$t('PleaseSelectLabelType'), trigger: 'blur' }
|
{ required: true, message: this.$t('PleaseSelectLabelType'), trigger: 'blur' }
|
||||||
|
|
||||||
],
|
],
|
||||||
|
orderNum: [
|
||||||
|
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||||
|
],
|
||||||
description: [
|
description: [
|
||||||
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
{ min: 1, max: 200, message: this.$t('cantExeed') + '200' + this.$t('characters'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
@@ -189,6 +200,16 @@
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//正则替换小数点
|
||||||
|
limitNumber(value) {
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||||
|
} else if (typeof value === 'number') {
|
||||||
|
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(param) {
|
loadData(param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
Reference in New Issue
Block a user