From 37dd3c4a5ef45d9f4c41c3fd5b8c44f5acb62502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 6 Nov 2020 14:35:45 +0300 Subject: [PATCH] fileupload filelimit warns --- src/components/fileupload/FileUpload.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/fileupload/FileUpload.vue b/src/components/fileupload/FileUpload.vue index f98f59c09..1ffed03c1 100755 --- a/src/components/fileupload/FileUpload.vue +++ b/src/components/fileupload/FileUpload.vue @@ -119,11 +119,11 @@ export default { } }, duplicateIEEvent: false, - uploadedFileCount: 0, data() { return { - files: null, - messages: null, + uploadedFileCount: 0, + files: [], + messages: [], focused: false, progress: null } @@ -239,7 +239,7 @@ export default { } }, clear() { - this.files = null; + this.files = []; this.messages = null; this.$emit('clear'); @@ -349,11 +349,7 @@ export default { }, checkFileLimit() { if (this.isFileLimitExceeded()) { - this.msgs.push({ - severity: 'error', - summary: this.invalidFileLimitMessageSummary.replace('{0}', this.fileLimit.toString()), - detail: this.invalidFileLimitMessageDetail.replace('{0}', this.fileLimit.toString()) - }); + this.messages.push(this.invalidFileLimitMessage.replace('{0}', this.fileLimit.toString())) } } },