Commit c01979e6 by 黑潮

update: 过滤字符

parent 63e18aea
......@@ -4,7 +4,7 @@
<h3 class="dm-title__label">基本信息</h3>
<el-row :gutter="20" class="message-detail__label">
<el-col :span="8">
<span class="primary-font-color">手工导入时间:</span>
<span class="primary-font-color">创建时间:</span>
<span class="regular-font-color">{{ formatDateTimeByType(info.createTime, 'yyyy-MM-dd-HH-mm-ss') }}</span>
</el-col>
<el-col :span="16">
......
......@@ -29,7 +29,7 @@
<div class="gray fz13">* 请勿在文案中使用“#”井号,会导致在用户端展示错误。</div>
</el-form-item>
<el-form-item label="头部文案">
<el-input type="textarea" :style="'color:' + info.headerColor" v-model="info.headerText" :rows="4" class="w450" :maxlength="200"></el-input>
<el-input type="textarea" :style="'color:' + info.headerColor" v-model="info.headerText" :rows="4" class="w450" :maxlength="200" @input="filterWord('headerText')"></el-input>
<div class="input-suffix clearfix">
<!-- <el-color-picker class="ml10 vertical-middle" v-model="info.headerColor"></el-color-picker> -->
<el-button type="text" class="vertical-middle ml10" @click="insetVar('headerText')">插入变量</el-button>
......@@ -51,7 +51,7 @@
</div>
</el-form-item>
<el-form-item label="尾部文案">
<el-input type="textarea" :style="'color:' + info.remarkColor" v-model="info.remarkText" :rows="4" class="w450" :maxlength="200"></el-input>
<el-input type="textarea" :style="'color:' + info.remarkColor" v-model="info.remarkText" :rows="4" class="w450" :maxlength="200" @input="filterWord('remarkText')"></el-input>
<div class="input-suffix clearfix">
<el-color-picker class="ml10 vertical-middle" v-model="info.remarkColor"></el-color-picker>
<el-button type="text" class="vertical-middle" @click="insetVar('remarkText')">插入变量</el-button>
......@@ -219,6 +219,9 @@ export default {
}
},
methods: {
filterWord(prop) {
this.info[prop] = this.info[prop].replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/g, '');
},
async listTemplateVariables() {
this.loading = true;
try {
......
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