From 35322555f2ddbc26e73b477e083d9267348c84cb Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期四, 03 十二月 2020 15:36:39 +0800
Subject: [PATCH] 修复编辑区域名称不显示的bug;数据栈信息名称添加命名限制
---
src/components/subComponents/FileUpload/uploader.vue | 77 +++++++++++---------------------------
1 files changed, 22 insertions(+), 55 deletions(-)
diff --git a/src/components/subComponents/FileUpload/uploader.vue b/src/components/subComponents/FileUpload/uploader.vue
index 41fb54c..6ada9f3 100644
--- a/src/components/subComponents/FileUpload/uploader.vue
+++ b/src/components/subComponents/FileUpload/uploader.vue
@@ -5,8 +5,8 @@
<uploader-unsupport></uploader-unsupport>
<uploader-drop>
<!-- <p>鎷栧姩鏂囦欢鍒拌鍖哄煙涓婁紶</p> -->
- <uploader-btn :attrs="attrs">閫夋嫨鏂囦欢</uploader-btn>
- <uploader-btn :directory="true" :attrs="attrs">閫夋嫨鏂囦欢澶�</uploader-btn>
+ <uploader-btn >閫夋嫨鏂囦欢</uploader-btn>
+ <uploader-btn :directory="true" >閫夋嫨鏂囦欢澶�</uploader-btn>
</uploader-drop>
<uploader-list></uploader-list>
</slot>
@@ -32,19 +32,6 @@
return {
uploader: this
}
- },
- watch:{
- attrs:{
- handler(n,o){
- console.log('uploader attrs update',n)
- this.$nextTick(()=>{
- //this.unBindUploader();
- this.bindUploader();
- })
- },
- deep: true
- },
-
},
props: {
attrs: {
@@ -132,51 +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)
},
+
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