|
@@ -248,7 +248,7 @@ export default {
|
|
*/
|
|
*/
|
|
getQuestionInfo() {
|
|
getQuestionInfo() {
|
|
if (this.index_list.length === 0) return;
|
|
if (this.index_list.length === 0) return;
|
|
- this.$refs.createMain.clearSaveDate();
|
|
|
|
|
|
+ this.$refs.createMain?.clearSaveDate();
|
|
this.loading = true;
|
|
this.loading = true;
|
|
let curId = this.index_list[this.curIndex].id;
|
|
let curId = this.index_list[this.curIndex].id;
|
|
GetQuestionInfo({ question_id: this.index_list[this.curIndex].id })
|
|
GetQuestionInfo({ question_id: this.index_list[this.curIndex].id })
|
|
@@ -293,7 +293,7 @@ export default {
|
|
*/
|
|
*/
|
|
selectExerciseItem(index) {
|
|
selectExerciseItem(index) {
|
|
if (index < 0 || index > this.index_list.length - 1) return;
|
|
if (index < 0 || index > this.index_list.length - 1) return;
|
|
- this.$refs.createMain.clearSaveDate();
|
|
|
|
|
|
+ this.$refs.createMain?.clearSaveDate();
|
|
this.$refs.createMain.saveQuestion();
|
|
this.$refs.createMain.saveQuestion();
|
|
this.curIndex = index;
|
|
this.curIndex = index;
|
|
},
|
|
},
|
|
@@ -402,7 +402,7 @@ export default {
|
|
* @param {number} param.oldIndex 移动前的索引
|
|
* @param {number} param.oldIndex 移动前的索引
|
|
*/
|
|
*/
|
|
handleStart({ newIndex, oldIndex }) {
|
|
handleStart({ newIndex, oldIndex }) {
|
|
- this.$refs.createMain.clearSaveDate();
|
|
|
|
|
|
+ this.$refs.createMain?.clearSaveDate();
|
|
let isMoveCur = newIndex === this.curIndex || oldIndex === this.curIndex; // 是否移动当前题目
|
|
let isMoveCur = newIndex === this.curIndex || oldIndex === this.curIndex; // 是否移动当前题目
|
|
let isEffectCurIndex = newIndex < this.curIndex !== oldIndex < this.curIndex; // 是否影响当前题目索引
|
|
let isEffectCurIndex = newIndex < this.curIndex !== oldIndex < this.curIndex; // 是否影响当前题目索引
|
|
if (isMoveCur || isEffectCurIndex) {
|
|
if (isMoveCur || isEffectCurIndex) {
|