Commit 69e4ff50 by 李伟康

修复BUG

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