Commit 69e4ff50 by 李伟康

修复BUG

1 parent 9df1550e
...@@ -337,7 +337,7 @@ export default { ...@@ -337,7 +337,7 @@ export default {
inputBlur () { inputBlur () {
const { type } = this.configForm, const { type } = this.configForm,
value = this.configForm[inputKeyObject[type]] value = this.configForm[inputKeyObject[type]]
let arr = value.split('\n'), let arr = Array.from(new Set([...value.split('\n').map(e => e)])),
str = [] str = []
arr.map(i => { arr.map(i => {
if (i && ((type === 1 || type === 2) && str.length < 10 || (type === 4 || type === 5))) { if (i && ((type === 1 || type === 2) && str.length < 10 || (type === 4 || type === 5))) {
...@@ -356,6 +356,7 @@ export default { ...@@ -356,6 +356,7 @@ export default {
let option = this.configForm[inputKeyObject[type]], let option = this.configForm[inputKeyObject[type]],
data = type == 3 ? option : option.split('\n'), data = type == 3 ? option : option.split('\n'),
itemValue = '' itemValue = ''
if (type != 3) {
if (type == 2 || type == 5) itemValue = [] if (type == 2 || type == 5) itemValue = []
if (type == 5) { if (type == 5) {
const title = data[0].split('/') const title = data[0].split('/')
...@@ -367,6 +368,8 @@ export default { ...@@ -367,6 +368,8 @@ export default {
data = this.transformData(data, three ? 3 : two ? 2 : 1) data = this.transformData(data, three ? 3 : two ? 2 : 1)
userInfoField = userInfoFields.join('/') userInfoField = userInfoFields.join('/')
} }
// else data = Array.from(new Set([...data.map(e => e)]))
}
this.$emit('addQuestions', { this.$emit('addQuestions', {
type, type,
required, required,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!