mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
SCORM课件的上传
This commit is contained in:
@@ -46,6 +46,10 @@ export default {
|
||||
props: {
|
||||
// 值
|
||||
value: [String, Object, Array],
|
||||
beforeMsg:{
|
||||
type: String,
|
||||
default:''
|
||||
},
|
||||
showList: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -78,7 +82,7 @@ export default {
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
type: Array,
|
||||
default: () => ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"],
|
||||
default: () => ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3","zip"],
|
||||
},
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
@@ -131,6 +135,10 @@ export default {
|
||||
methods: {
|
||||
// 上传前校检格式和大小
|
||||
handleBeforeUpload(file) {
|
||||
if(this.beforeMsg){
|
||||
this.$message({message:this.beforeMsg,type:'error',offset:100})
|
||||
return false;
|
||||
}
|
||||
// 校检文件类型
|
||||
if (this.fileType) {
|
||||
let fileExtension = "";
|
||||
@@ -200,7 +208,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
this.fileList = this.list;
|
||||
},
|
||||
};
|
||||
@@ -215,14 +223,14 @@ export default {
|
||||
line-height: 2;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
.upload-file-list .ele-upload-list__item-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: inherit;
|
||||
|
||||
|
||||
}
|
||||
.ele-upload-list__item-content-action .el-link {
|
||||
margin-right: 10px;
|
||||
|
||||
Reference in New Issue
Block a user