From 04778febcef19550ac10e6a386b1503929e91d2a Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 1 Feb 2023 17:27:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/d-form/components/d-form/d-form.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/uni_modules/d-form/components/d-form/d-form.vue b/uni_modules/d-form/components/d-form/d-form.vue index 6deccb0..dcc8493 100644 --- a/uni_modules/d-form/components/d-form/d-form.vue +++ b/uni_modules/d-form/components/d-form/d-form.vue @@ -359,7 +359,7 @@ import {dataType} from 'black-knight/lib/config/tools' if(this.type=='dateRange' && this.dateType=='end' && this.value[0])return new Date(this.value[0]).getTime(); }, imgs(){ - if(this.type=='upImg')return this.value.map((v,index)=>({url:`${host('imgUrl')}/${v}`,status:"success",index,type:'saved'})).concat(this.imgList.map((v,index)=>Object.assign(v,{index,type:'unsaved'}))) + if(this.type=='upImg')return this.value.map((v,index)=>({url:`${host('imgUrl')}/${v}`,tempUrl:v,status:"success",index,type:'saved'})).concat(this.imgList.map((v,index)=>Object.assign(v,{index,type:'unsaved'}))) return [] }, pickerContent(){//下拉选择 表单显示数据 @@ -381,9 +381,9 @@ import {dataType} from 'black-knight/lib/config/tools' setPickerCol.bind(this.$refs.picker)(this.columns[0]||[],this.value,1) }) } - }, - activated(){ - console.log("-------activated---------------") + if(this.type=='upImg'){ + window.the=this + } }, methods:{ async afterRead(e){ @@ -410,15 +410,15 @@ import {dataType} from 'black-knight/lib/config/tools' this.imgList=this.imgList.filter(v=>!v==e.file[i]) } } - this.$emit('imgs',this.imgs.map(v=>({saved:v.url,unsaved:v.tempUrl})[v.type]).join(',')) + this.$emit('imgs',this.imgs.map(v=>v.tempUrl).join(',')) }, delImg({file}){ if(file.type=='unsaved'){ this.imgList.splice(file.index,1) }else{ - this.$emit("input",this.value.filter(v=>v.index!=file.index).map(v=>v.url)) + this.$emit("input",this.value.filter((v,k)=>k!=file.index)) } - this.$emit('imgs',this.imgs.map(v=>({saved:v.url,unsaved:v.tempUrl})[v.type]).join(',')) + this.$emit('imgs',this.imgs.map(v=>v.tempUrl).join(',')) }, pickerChange(e){ if(dataType(e.value[e.columnIndex].children, 'array')){ @@ -435,7 +435,7 @@ import {dataType} from 'black-knight/lib/config/tools' this.maps.setMapType(plus.maps.MapType.MAPTYPE_SATELLITE) this.maps.onclick=(e)=>{ if(this.value.length<0){ - + } console.log(e,'-------maps--click---------') }