From 93a26507f76156fa65aead1515c430688c089e1d Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期一, 22 二月 2021 15:49:01 +0800 Subject: [PATCH] 新版目录树样式调试及状态更新调试;朔黄批量导入列表调试;视频检索页面添加处理参数,添加标注接口添加参数;分页器展示优化,默认检索时间调整;转储设备接口调试 --- src/components/subComponents/FileUpload/uploader.vue | 76 ++++++++++---------------------------- 1 files changed, 20 insertions(+), 56 deletions(-) diff --git a/src/components/subComponents/FileUpload/uploader.vue b/src/components/subComponents/FileUpload/uploader.vue index ddcedb9..6ada9f3 100644 --- a/src/components/subComponents/FileUpload/uploader.vue +++ b/src/components/subComponents/FileUpload/uploader.vue @@ -33,19 +33,6 @@ uploader: this } }, - watch:{ - attrs:{ - handler(n,o){ - console.log('uploader attrs update',n) - //this.$nextTick(()=>{ - this.unBindUploader(); - this.bindUploader(); - //}) - }, - deep: true - }, - - }, props: { attrs: { type: Object, @@ -132,54 +119,31 @@ }, closeHandle() { this.$emit("close") - }, - bindUploader(){ - console.log('new Uploader') - this.options.initialPaused = !this.autoStart - const uploader = new Uploader(this.options) - this.uploader = uploader - this.uploader.fileStatusText = this.fileStatusText - uploader.on('catchAll', this.allEvent) - uploader.on(FILE_ADDED_EVENT, this.fileAdded) - uploader.on(FILES_ADDED_EVENT, this.filesAdded) - uploader.on('fileRemoved', this.fileRemoved) - uploader.on('filesSubmitted', this.filesSubmitted) - }, - unBindUploader(){ - const uploader = this.uploader - uploader.off('catchAll', this.allEvent) - uploader.off(FILE_ADDED_EVENT, this.fileAdded) - uploader.off(FILES_ADDED_EVENT, this.filesAdded) - uploader.off('fileRemoved', this.fileRemoved) - uploader.off('filesSubmitted', this.filesSubmitted) - this.uploader = null } }, created() { - console.log('uploader attrs',this.attrs); - this.bindUploader(); - // this.options.initialPaused = !this.autoStart - // const uploader = new Uploader(this.options) - // this.uploader = uploader - // this.uploader.fileStatusText = this.fileStatusText - // uploader.on('catchAll', this.allEvent) - // uploader.on(FILE_ADDED_EVENT, this.fileAdded) - // uploader.on(FILES_ADDED_EVENT, this.filesAdded) - // uploader.on('fileRemoved', this.fileRemoved) - // uploader.on('filesSubmitted', this.filesSubmitted) + // console.log('uploader attrs',this.attrs); + // this.bindUploader(); + this.options.initialPaused = !this.autoStart + const uploader = new Uploader(this.options) + this.uploader = uploader + this.uploader.fileStatusText = this.fileStatusText + uploader.on('catchAll', this.allEvent) + uploader.on(FILE_ADDED_EVENT, this.fileAdded) + uploader.on(FILES_ADDED_EVENT, this.filesAdded) + uploader.on('fileRemoved', this.fileRemoved) + uploader.on('filesSubmitted', this.filesSubmitted) }, - mounted(){ - //this.bindUploader(); - }, + destroyed() { - this.unBindUploader(); - // const uploader = this.uploader - // uploader.off('catchAll', this.allEvent) - // uploader.off(FILE_ADDED_EVENT, this.fileAdded) - // uploader.off(FILES_ADDED_EVENT, this.filesAdded) - // uploader.off('fileRemoved', this.fileRemoved) - // uploader.off('filesSubmitted', this.filesSubmitted) - // this.uploader = null + //this.unBindUploader(); + const uploader = this.uploader + uploader.off('catchAll', this.allEvent) + uploader.off(FILE_ADDED_EVENT, this.fileAdded) + uploader.off(FILES_ADDED_EVENT, this.filesAdded) + uploader.off('fileRemoved', this.fileRemoved) + uploader.off('filesSubmitted', this.filesSubmitted) + this.uploader = null }, components: { UploaderBtn, -- Gitblit v1.8.0