修复选项清空bug

This commit is contained in:
alvis
2021-02-23 08:51:04 +08:00
parent cb9c5ffcc5
commit aac89f3df7
32 changed files with 61 additions and 56 deletions

View File

@@ -4465,9 +4465,9 @@
}
},
"core-js": {
"version": "3.8.3",
"resolved": "https://registry.npm.taobao.org/core-js/download/core-js-3.8.3.tgz?cache=0&sync_timestamp=1611040756909&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.8.3.tgz",
"integrity": "sha1-whkG4fFPNon5OrzG4miDVQ3ZLdA="
"version": "3.9.0",
"resolved": "https://registry.npm.taobao.org/core-js/download/core-js-3.9.0.tgz?cache=0&sync_timestamp=1613668840564&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-3.9.0.tgz",
"integrity": "sha1-eQsbsRVToicrNuJiXHF52zRUkvg="
},
"core-js-compat": {
"version": "3.8.3",

View File

@@ -16,7 +16,7 @@
},
"dependencies": {
"axios": "^0.19.0",
"core-js": "^3.8.3",
"core-js": "^3.9.0",
"element-ui": "^2.15.0",
"js-cookie": "2.2.0",
"normalize.css": "8.0.1",

View File

@@ -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 () {