Commit d4b16319 by 李伟康

提交

1 parent dfff8d8b
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
v-model="chatForm.scriptContent" v-model="chatForm.scriptContent"
maxlength="300" maxlength="300"
show-word-limit show-word-limit
@input="chatForm.scriptContent = $event.replace(emojiReg, '')"
> >
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -81,6 +82,8 @@ ...@@ -81,6 +82,8 @@
v-model="editGroupText.newGroup" v-model="editGroupText.newGroup"
maxlength="10" maxlength="10"
placeholder="请输入" placeholder="请输入"
@input="editGroupText.newGroup = $event.replace(emojiReg, '')"
ref="editInput"
> >
<div <div
slot="suffix" slot="suffix"
...@@ -98,7 +101,7 @@ ...@@ -98,7 +101,7 @@
<template v-else> <template v-else>
<div <div
class="add-btn item" class="add-btn item"
@click.self="editState = true" @click.self="editState = true; focusInput()"
> >
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
新增一项 新增一项
...@@ -130,10 +133,12 @@ ...@@ -130,10 +133,12 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac])/g
export default { export default {
name: 'detail', name: 'detail',
data () { data () {
return { return {
emojiReg,
groupVisible: false, groupVisible: false,
editState: false, editState: false,
title: '', title: '',
...@@ -206,12 +211,19 @@ export default { ...@@ -206,12 +211,19 @@ export default {
} }
this.loading = false this.loading = false
}, },
/**编辑聚焦 */
focusInput () {
this.$nextTick(() => {
this.$refs.editInput.focus()
})
},
/**新增话术组 */ /**新增话术组 */
showEditGroupInput (value) { showEditGroupInput (value) {
this.editGroupText = { this.editGroupText = {
oldGroup: value, oldGroup: value,
newGroup: value newGroup: value
} }
if (value) this.focusInput()
this.editState = false this.editState = false
}, },
/**关闭弹框 */ /**关闭弹框 */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!