|
@@ -76,9 +76,18 @@ export default {
|
|
|
return !this.allowAnswer && !this.allowScore
|
|
|
},
|
|
|
questionWithSeq() {
|
|
|
- let prefix = this.question.seq ? this.question.seq + '、' : ''
|
|
|
- if (this.question.type) prefix += '[' + this.question.type + ']'
|
|
|
- return prefix + this.question.title
|
|
|
+ const {seq, type, title} = this.question
|
|
|
+ let prefix = seq ? seq + '、' : ''
|
|
|
+ if (type) prefix += '[' + type + ']'
|
|
|
+ if (title?.startsWith('<div')||title?.startsWith('<p')) {
|
|
|
+ let tagBegin = /<(div|p)[^>]*>(\s|( ))*/.exec(title)?.first()
|
|
|
+ if (tagBegin) {
|
|
|
+ const titleRest = title.substring(tagBegin.length)
|
|
|
+ tagBegin = tagBegin.replaceAll(' ', '').replaceAll(' ', '')
|
|
|
+ return tagBegin + prefix + titleRest
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return prefix + title
|
|
|
},
|
|
|
optionsVisible() {
|
|
|
return this.question.options && this.question.options.length
|