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 @@