|
@@ -11,27 +11,25 @@
|
|
|
|
|
|
<script>
|
|
|
import UploadFile from './components/UploadView.vue';
|
|
|
+import { getUploadPreviewData } from '@/views/book/courseware/data/uploadPreview';
|
|
|
|
|
|
export default {
|
|
|
name: 'UploadControlPreview',
|
|
|
components: { UploadFile },
|
|
|
data() {
|
|
|
return {
|
|
|
- labelText: '文件',
|
|
|
- acceptFileType: '.png,.jpg,.pdf',
|
|
|
- uploadTip:
|
|
|
- 'The size of the uploaded image should not exceed 2MB, the size of the uploaded audio file, pdf file, and excel file should not exceed 20MB, and the size of the uploaded audio file should not exceed 20MB',
|
|
|
- iconClass: 'picture',
|
|
|
- fileList: [],
|
|
|
- type: 'upload_control',
|
|
|
+ data: getUploadPreviewData(),
|
|
|
};
|
|
|
},
|
|
|
- methods: {
|
|
|
- updateFileList({ file_list, file_id_list, file_info_list }) {
|
|
|
- this.data.file_list = file_list;
|
|
|
- this.data.file_id_list = file_id_list;
|
|
|
- this.data.file_info_list = file_info_list;
|
|
|
+ watch: {
|
|
|
+ 'data.file_list': {
|
|
|
+ handler(val) {
|
|
|
+ console.log(val);
|
|
|
+ },
|
|
|
+ immediate: true,
|
|
|
},
|
|
|
},
|
|
|
+ created() {},
|
|
|
+ methods: {},
|
|
|
};
|
|
|
</script>
|