部分页面调整

This commit is contained in:
X1627315083
2024-06-17 11:32:31 +08:00
parent 363b880276
commit 9b8134989d
19 changed files with 192 additions and 106 deletions

View File

@@ -510,7 +510,7 @@ export default defineComponent({
// console.log(JSON.parse(JSON.stringify(this.colorList)),JSON.parse(JSON.stringify(newVal)));
clearInterval(this.getPantongNameTime)
this.getPantongNameTime = setTimeout(() => {
this.getPantongName(newVal.rgba)
this.getPantongName(newVal.rgba,-1)
}, 100);
},
immediate: true
@@ -1021,7 +1021,7 @@ export default defineComponent({
},
//查询颜色的潘通值和txc
getPantongName(v) {
getPantongName(v,index) {
if(v?.r == undefined){
return
}
@@ -1036,8 +1036,13 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.getRgbByHsvBatch, data)
.then((rv) => {
if (rv) {
this.colorList[this.selectIndex].tcx = rv[0].tcx
this.colorList[this.selectIndex].name = rv[0].name
if(index == -1){
this.colorList[this.selectIndex].tcx = rv[0].tcx
this.colorList[this.selectIndex].name = rv[0].name
}else{
this.colorList[index].tcx = rv[0].tcx
this.colorList[index].name = rv[0].name
}
resolve();
}
})
@@ -1114,7 +1119,18 @@ export default defineComponent({
});
this.selectColorList = selectColorList
// this.getHsvColor(selectColorList)
this.selectColor = {rgba:{r:color[0],g:color[1],b:color[2],a:1},hex:colorHex}
// this.selectColor = {rgba:{r:color[0],g:color[1],b:color[2],a:1},hex:colorHex}
let colorListIndex = []
this.colorList.forEach((item,index)=>{
if(!item.rgba){
colorListIndex.push(index)
}
})
for (let index = 0; index < selectColorList.length; index++) {
this.colorList[colorListIndex[0]] = selectColorList[index]
this.getPantongName(selectColorList[index].rgba,colorListIndex[0])
colorListIndex.splice(0,1)
}
img.remove()
};