|
|
@@ -1,7 +1,6 @@
|
|
|
<script>
|
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
import {Close, UploadFilled} from "@element-plus/icons-vue";
|
|
|
-import debounce from "lodash-es/debounce";
|
|
|
|
|
|
export default {
|
|
|
name: "HomeworkTab",
|
|
|
@@ -242,13 +241,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- createWritingHomeworkDebounce: debounce(function () {
|
|
|
- this.createHomework();
|
|
|
- }, 1000, { leading: true, trailing: false }),
|
|
|
|
|
|
- createSpeakingHomeworkDebounce: debounce(function () {
|
|
|
- this.createSpeakingHomework();
|
|
|
- }, 1000, { leading: true, trailing: false }),
|
|
|
handleClose(){
|
|
|
ElMessageBox.confirm("确认吗?你的修改将不会保存。",{
|
|
|
confirmButtonText:"确认",
|
|
|
@@ -655,7 +648,7 @@ export default {
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="createHomeworkCancel">取消</el-button>
|
|
|
- <el-button type="primary" @click="createWritingHomeworkDebounce">
|
|
|
+ <el-button type="primary" @click="createHomework">
|
|
|
创建
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -860,7 +853,7 @@ export default {
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="createHomeworkCancel">取消</el-button>
|
|
|
- <el-button type="primary" @click="createSpeakingHomeworkDebounce">
|
|
|
+ <el-button type="primary" @click="createSpeakingHomework">
|
|
|
创建
|
|
|
</el-button>
|
|
|
</div>
|