修复颜色页面bug

This commit is contained in:
X1627315083
2024-08-06 10:05:50 +08:00
parent 12ea743827
commit ffa1da742f
11 changed files with 185 additions and 108 deletions

View File

@@ -281,6 +281,7 @@ export default defineComponent({
// return this.setGradientAngle(gradient)
return (gradient)=>{
let gradientStr = ''
if(!gradient.gradientList)return
gradient.gradientList.sort((a, b) => {
let aArr = a.left.split('%')[0]
let bArr = b.left.split('%')[0]
@@ -771,7 +772,7 @@ export default defineComponent({
this.colorList[this.selectIndex].gradient = JSON.parse(JSON.stringify(this.gradient))
}else{
this.selectColor = {rgba:this.colorList[this.selectIndex].gradient.gradientList[0].rgba}
this.colorList[this.selectIndex].gradient = {}
this.colorList[this.selectIndex].gradient = null
}
let colorList =this.colorList.filter((v) => v && Object.keys(v).length)
this.setColorboardList(colorList)