From f606a192d18118660a86cea0826a5294791928ea Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Tue, 15 Oct 2024 17:44:37 +0800 Subject: [PATCH] fix --- src/component/Detail/DesignDetailAlter.vue | 32 +++++++++++++++------- src/component/Detail/DesignDetailEnd.vue | 13 +++++++-- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/component/Detail/DesignDetailAlter.vue b/src/component/Detail/DesignDetailAlter.vue index 211304ce..5a4a2ccc 100644 --- a/src/component/Detail/DesignDetailAlter.vue +++ b/src/component/Detail/DesignDetailAlter.vue @@ -609,21 +609,33 @@ export default defineComponent({ this.clothesList = [] this.getLibraryList() }else{ + let rgba = { + r:this.current.color.r+"", + g:this.current.color.g+"", + b:this.current.color.b+"", + a:1 + } + let ind = 0 this.store.state.UploadFilesModule.allBoardData?.colorBoards?.forEach((item,index) => { - this.colorList[index+1] = { - gradient:item.gradient, - rgba:item.rgbValue, - tcx:item.tcx, - name:item.name, - } - if(item.gradient){ - this.colorList[index+1].gradient = item.gradient + console.log(JSON.stringify(rgba) , JSON.stringify(item.rgbValue)); + if(JSON.stringify(rgba) == JSON.stringify(item.rgbValue)){ + ind+=1 }else{ - delete this.colorList[index+1].gradient + this.colorList[index+1 - ind] = { + gradient:item.gradient, + rgba:item.rgbValue, + tcx:item.tcx, + name:item.name, + } + if(item.gradient){ + this.colorList[index+1 - ind].gradient = item.gradient + }else{ + delete this.colorList[index+1 - ind].gradient + } } + }) } - let DesignDetailEnd = this.$refs.DesignDetailEnd DesignDetailEnd.init(num) this.workspaceCom = computed(()=>{ diff --git a/src/component/Detail/DesignDetailEnd.vue b/src/component/Detail/DesignDetailEnd.vue index e030c3fc..fdd10956 100644 --- a/src/component/Detail/DesignDetailEnd.vue +++ b/src/component/Detail/DesignDetailEnd.vue @@ -91,6 +91,8 @@
{{ $t('DesignDetailEnd.preview') }}
+ +
{{ $t('Habit.Clear') }}
{{ $t('DesignDetailEnd.Layout') }}
{{ $t('DesignDetailEnd.Layout') }}
@@ -352,7 +354,7 @@ export default defineComponent({ DesignElementsOperation.init() }, //提交 - setPreview(){ + setPreview(str){ let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail)) let index let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData)) @@ -385,7 +387,9 @@ export default defineComponent({ data.designSingleItemDTOList[index].path =this.sketchImg.minIOPath? this.sketchImg.minIOPath: this.current.minIOPath data.designSingleItemDTOList[index].type =this.sketchImg.type? this.sketchImg.type: this.current.type }else if(this.type_ == 2){ - data.designSingleItemDTOList[index].printObject.prints = [] + if(str == 'clearPrint'){ + data.designSingleItemDTOList[index].printObject.prints = [] + } }else if(this.type_ == 3){ if(this.colorList[this.selectIndex]?.rgba?.r == undefined){ message.info(this.t('DesignDetailEnd.jsContent2')) @@ -702,8 +706,11 @@ export default defineComponent({ } } .subitOkPreviewBtn{ - bottom: calc(4rem*1.2); + bottom: calc(3rem*1.2); position: absolute; + &.clear{ + bottom: calc(7rem); + } &.active{ opacity: .5; pointer-events:none;