mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 08:16:44 +08:00
修改bug3.0
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import {mapActions, mapGetters} from "vuex";
|
||||
import {getCertificationProcess, getTeacherInfo, setOfflineTutoring, treeList} from "@/api/modules/lecturer"
|
||||
import processStatus from "@/components/processStatus.vue";
|
||||
import axios from "axios";
|
||||
export default {
|
||||
name: "FinalDraft",
|
||||
components: {processStatus},
|
||||
@@ -143,6 +144,14 @@ export default {
|
||||
message: '上传失败',
|
||||
type: 'error'
|
||||
});
|
||||
},
|
||||
beforeUpload(file) {
|
||||
axios.defaults.timeout = 30000;
|
||||
const isLt2M = file.size / 1024 / 1024 <= 500;
|
||||
if (!isLt2M) {
|
||||
this.$message.error('文件大小超出500M,请重新上传');
|
||||
}
|
||||
return isLt2M;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -209,6 +218,7 @@ export default {
|
||||
:on-success="handlSuccess"
|
||||
:on-error="handlError"
|
||||
:limit="1"
|
||||
:before-upload="beforeUpload"
|
||||
:on-remove="handRemove"
|
||||
multiple>
|
||||
<i class="el-icon-upload"></i>
|
||||
|
||||
Reference in New Issue
Block a user