|
@@ -326,6 +326,7 @@ export default {
|
|
|
"curElement",
|
|
|
"curPage",
|
|
|
"curPageNo",
|
|
|
+ "explainHeight",
|
|
|
]),
|
|
|
cardHeadSampleData() {
|
|
|
if (!this.cardConfig["pageSize"]) return;
|
|
@@ -352,6 +353,7 @@ export default {
|
|
|
"setOpenElementEditDialog",
|
|
|
"setCurDragElement",
|
|
|
"setPages",
|
|
|
+ "setExplainHeight",
|
|
|
"initState",
|
|
|
]),
|
|
|
...mapActions("card", [
|
|
@@ -379,6 +381,7 @@ export default {
|
|
|
this.addWatch();
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
+ this.updateExamplainHeight();
|
|
|
this.registSrollEvent();
|
|
|
});
|
|
|
},
|
|
@@ -391,6 +394,11 @@ export default {
|
|
|
this.setCurPage(0);
|
|
|
});
|
|
|
},
|
|
|
+ updateExamplainHeight() {
|
|
|
+ let columnHeight = document.getElementById("topic-column").offsetHeight;
|
|
|
+ if (this.cardConfig.subjectiveAttention) columnHeight -= 24;
|
|
|
+ this.setExplainHeight(Math.floor(columnHeight / 4));
|
|
|
+ },
|
|
|
addNewTopic(item) {
|
|
|
if (!item.type) {
|
|
|
this.$message.error("试题类型丢失!");
|
|
@@ -403,6 +411,8 @@ export default {
|
|
|
["FILL_QUESTION_SIMPLE", "FILL_QUESTION_MULTIPLY"].includes(item.type)
|
|
|
) {
|
|
|
element.optionCount = this.cardConfig.defaultOptionNumber;
|
|
|
+ } else if (item.type === "EXPLAIN") {
|
|
|
+ element.explainHeight = this.explainHeight;
|
|
|
}
|
|
|
|
|
|
if (item.type === "FORBID_AREA") {
|