|
@@ -29,6 +29,7 @@
|
|
|
:is="exerciseComponents[item.type]"
|
|
|
ref="exercise"
|
|
|
:is-child="true"
|
|
|
+ :is-change.sync="change"
|
|
|
:question-id="item.id"
|
|
|
@updatePreviewData="updatePreviewData(i, $event)"
|
|
|
/>
|
|
@@ -118,6 +119,7 @@ export default {
|
|
|
inject: ['exercise_id'],
|
|
|
data() {
|
|
|
return {
|
|
|
+ change: false, // 是否修改了题目类型
|
|
|
questionTypeOption,
|
|
|
exerciseTypeList,
|
|
|
childPreviewData: [],
|
|
@@ -173,6 +175,7 @@ export default {
|
|
|
* @param {Array} arr 选中的题目类型
|
|
|
*/
|
|
|
updateCurQuestionType(i, arr) {
|
|
|
+ this.change = true;
|
|
|
let type = arr[arr.length - 1];
|
|
|
this.data.question_list[i].type = type;
|
|
|
this.data.question_list[i].additional_type = type === 'select' ? 'single' : '';
|