修复选项清空bug
This commit is contained in:
@@ -157,8 +157,13 @@ export default {
|
||||
},
|
||||
questionItemAdd () {
|
||||
let items = this.form.items
|
||||
let last = items[items.length - 1]
|
||||
let newLastPrefix = String.fromCharCode(last.prefix.charCodeAt() + 1)
|
||||
let newLastPrefix
|
||||
if (items.length > 0) {
|
||||
let last = items[items.length - 1]
|
||||
newLastPrefix = String.fromCharCode(last.prefix.charCodeAt() + 1)
|
||||
} else {
|
||||
newLastPrefix = 'A'
|
||||
}
|
||||
items.push({ id: null, prefix: newLastPrefix, content: '' })
|
||||
},
|
||||
submitForm () {
|
||||
|
||||
Reference in New Issue
Block a user