调整颜色没有潘通值的情况下展示效果

This commit is contained in:
X1627315083
2025-03-18 18:16:33 +08:00
parent 0bdea97ab8
commit cf8caedc58
5 changed files with 12 additions and 12 deletions

View File

@@ -119,9 +119,9 @@
</div>
<div class="img_block_item centent" @click.stop="openCurrent(3)">
<div class="color_item">
<div v-if="!current?.gradient" class="color_content" :style="{background:`rgba(${current?.color?.r},${current?.color?.g},${current?.color?.b},${current?.color?.a?current?.color.a:1})`}"></div>
<div v-if="!current?.gradient" class="color_content" :style="{background:`rgba(${current?.color?.r?current?.color?.r:'255'},${current?.color?.g?current?.color?.g:'255'},${current?.color?.b?current?.color?.b:'255'},${current?.color?.a?current?.color.a:1})`}"></div>
<div class="color_content" v-else :style="{height:'10rem','background-image':current?.gradient?`linear-gradient(${current?.gradient.angle}deg,${setGradient(current?.gradient)}`:'none'}"></div>
<div v-if="!current?.gradient" class="color_content_body">
<div v-if="!current?.gradient" class="color_content_body" :style="{'text-align':current?.color?.name?'left':'center'}">
<div class="color_des">{{current?.color?.tcx}}</div>
<div class="color_des">{{current?.color?.name}}</div>
</div>
@@ -735,7 +735,7 @@ export default defineComponent({
// let zIndex = 10
designItemDetail.clothes.forEach((item:any,index:number) => {
let clothesItem:any = {
color: `${item.color.r} ${item.color.g} ${item.color.b}`,
color: item?.color?.r?`${item.color.r} ${item.color.g} ${item.color.b}`:null ,
id:item.id,
path:item.minIOPath,
gradient:{},
@@ -1094,7 +1094,7 @@ export default defineComponent({
this.current.sketchString = ''
this.currentIndex = this.currentIndex>0?this.currentIndex:0
data.designSingleItemDTOList[this.currentIndex] = {
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
color:this.current?.color?.r?`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`:null,
id:this.current.id?this.current.id:'',
changed:this.current.changed?this.current.changed:false,
designType:this.current.designType?this.current.designType:'Library',