Commit 15da5767 authored by Smile's avatar Smile Committed by wux

【后台-等级设置-新增/修改】“名称”、“等级说明”输入需要修改。 去掉不能输入空格限制,改为去除前后空格

parent 7493035e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dict-selector clearable :disabled="true" :type="DICT_TYPE.ENABLE_STATUS" v-model="queryParams.status" formatter="number"> </dict-selector> <dict-selector clearable :disabled="true" :type="DICT_TYPE.ENABLE_STATUS" v-model="queryParams.status" formatter="number"> </dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('名称')" prop="name"> <el-form-item :label="$t('名称')" prop="name">
<el-input v-model="queryParams.name" style="width: 50%;" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"></el-input> <el-input v-model="queryParams.name" style="width: 50%;" clearable @blur="trimParams('name')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('等级')" prop="level"> <el-form-item :label="$t('等级')" prop="level">
<dict-selector clearable :disabled="showViewTime" :type="DICT_TYPE.MEMBERSHIP_LEVELS" v-model="queryParams.level"> </dict-selector> <dict-selector clearable :disabled="showViewTime" :type="DICT_TYPE.MEMBERSHIP_LEVELS" v-model="queryParams.level"> </dict-selector>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<image-upload v-model="queryParams.icon" :fileType="['png', 'jpg', 'jpeg']" :limit="1" /> <image-upload v-model="queryParams.icon" :fileType="['png', 'jpg', 'jpeg']" :limit="1" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('等级说明')" style="width: 30%;" prop="description"> <el-form-item :label="$t('等级说明')" style="width: 30%;" prop="description">
<el-input type="textarea" autosize :autosize="{ minRows: 2, maxRows: 4}" v-model="queryParams.description" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"></el-input> <el-input type="textarea" autosize :autosize="{ minRows: 2, maxRows: 4}" v-model="queryParams.description" @blur="trimParams('description')"></el-input>
<span style="color: red;">注:用于客户积分日志显示,请规范填写</span> <span style="color: red;">注:用于客户积分日志显示,请规范填写</span>
</el-form-item> </el-form-item>
<el-form-item :label="$t('匹配顺序')" style="width: 30%;" prop="sort"> <el-form-item :label="$t('匹配顺序')" style="width: 30%;" prop="sort">
...@@ -277,6 +277,9 @@ export default { ...@@ -277,6 +277,9 @@ export default {
} }
}, },
methods: { methods: {
trimParams(val) {
this.queryParams[val] = this.queryParams[val].trim();
},
validatePositiveInteger(rule, value, callback) { validatePositiveInteger(rule, value, callback) {
if (!value) { if (!value) {
return callback(new Error(this.$t("请输入整数"))); return callback(new Error(this.$t("请输入整数")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment