Commit d4b16319 by 李伟康

提交

1 parent dfff8d8b
......@@ -48,6 +48,7 @@
v-model="chatForm.scriptContent"
maxlength="300"
show-word-limit
@input="chatForm.scriptContent = $event.replace(emojiReg, '')"
>
</el-input>
</el-form-item>
......@@ -81,6 +82,8 @@
v-model="editGroupText.newGroup"
maxlength="10"
placeholder="请输入"
@input="editGroupText.newGroup = $event.replace(emojiReg, '')"
ref="editInput"
>
<div
slot="suffix"
......@@ -98,7 +101,7 @@
<template v-else>
<div
class="add-btn item"
@click.self="editState = true"
@click.self="editState = true; focusInput()"
>
<i class="el-icon-circle-plus-outline"></i>
新增一项
......@@ -130,10 +133,12 @@
<script type='text/ecmascript-6'>
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 {
name: 'detail',
data () {
return {
emojiReg,
groupVisible: false,
editState: false,
title: '',
......@@ -206,12 +211,19 @@ export default {
}
this.loading = false
},
/**编辑聚焦 */
focusInput () {
this.$nextTick(() => {
this.$refs.editInput.focus()
})
},
/**新增话术组 */
showEditGroupInput (value) {
this.editGroupText = {
oldGroup: value,
newGroup: value
}
if (value) this.focusInput()
this.editState = false
},
/**关闭弹框 */
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!