From c3af2406b71cf6ec5db340df067389650a2f3c6b Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Fri, 21 Aug 2020 20:29:06 +0530 Subject: [PATCH] document section for pdf in course detail --- src/pages/Common/UploadPdf.vue | 22 ++++++------ src/pages/Course/courseDetail.vue | 73 +++++++-------------------------------- 2 files changed, 23 insertions(+), 72 deletions(-) diff --git a/src/pages/Common/UploadPdf.vue b/src/pages/Common/UploadPdf.vue index 829d40c..e55c79a 100644 --- a/src/pages/Common/UploadPdf.vue +++ b/src/pages/Common/UploadPdf.vue @@ -23,7 +23,7 @@ export default { return { fileToLoad: "", fileName: "", - fileInBase64: "" + fileInBase64: "", }; }, methods: { @@ -39,12 +39,12 @@ export default { // Select the very first file from list this.fileToLoad = selectedFile[0]; this.fileName = selectedFile[0].name; - console.log("file name - ", this.fileName); + // console.log("file name - ", this.fileName); // FileReader function for read the file. var fileReader = new FileReader(); // Onload of file read the file content let vm = this; - fileReader.onload = function(fileLoadedEvent) { + fileReader.onload = function (fileLoadedEvent) { vm.fileInBase64 = fileLoadedEvent.target.result; // Print data in console // console.log(vm.fileInBase64); @@ -54,9 +54,9 @@ export default { // console.log("required - ", requiredUrl); let fileData = { - fileName: this.fileName, + selectedFileName: vm.fileName, fileInBase64: requiredUrl, - emptyPdf: "" + emptyPdf: "", }; vm.$emit("pdfFileSelected", fileData); }; @@ -78,10 +78,10 @@ export default { let fileData = { fileName: this.fileName, fileInBase64: this.fileInBase64, - trigger: "" + trigger: "", }; this.$emit("fileSelected", fileData); - } + }, }, watch: { respondToTrigger() { @@ -89,17 +89,17 @@ export default { // console.log("Reset pdf - ", this.emptyPdf); this.resetInput(); } - } + }, }, computed: { respondToTrigger: { get() { return this.emptyPdf; }, - set(newVal) {} + set(newVal) {}, // this.respondToTrigger = this.trigger; - } - } + }, + }, };