|
@@ -60,6 +60,9 @@
|
|
@blur="$event => textInput($event)"
|
|
@blur="$event => textInput($event)"
|
|
class="stu-answer"
|
|
class="stu-answer"
|
|
></div>
|
|
></div>
|
|
|
|
+ <div style="float: right; margin-top: -25px; margin-right: 10px;">
|
|
|
|
+ {{ answerWordCount }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
<div>
|
|
<div>
|
|
@@ -298,6 +301,17 @@ export default {
|
|
rightAnswerTransform() {
|
|
rightAnswerTransform() {
|
|
return this.question.rightAnswer.join("");
|
|
return this.question.rightAnswer.join("");
|
|
},
|
|
},
|
|
|
|
+ answerWordCount() {
|
|
|
|
+ if (this.$refs.answerDiv) {
|
|
|
|
+ return this.$refs.answerDiv.innerText.length;
|
|
|
|
+ } else {
|
|
|
|
+ const ele = document.createElement("div");
|
|
|
|
+ ele.innerHTML = this.studentAnswer;
|
|
|
|
+ ele.innerText.length;
|
|
|
|
+
|
|
|
|
+ return ele.innerText.length;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
isAudioAnswerType() {
|
|
isAudioAnswerType() {
|
|
return this.examQuestion.answerType === "SINGLE_AUDIO";
|
|
return this.examQuestion.answerType === "SINGLE_AUDIO";
|
|
},
|
|
},
|