修复页面刷新sketch会增加和颜色板块关闭后再次打开颜色异常问题
This commit is contained in:
@@ -450,7 +450,7 @@ export default defineComponent({
|
||||
|
||||
//清除当前的颜色
|
||||
clearCurrentColor(index){
|
||||
this.selectColor = {}
|
||||
// this.selectColor = {}
|
||||
// this.fileList = []
|
||||
this.reviewColor={}
|
||||
this.colorList[index] = {}
|
||||
@@ -673,6 +673,7 @@ export default defineComponent({
|
||||
|
||||
openSetData(){
|
||||
let colorList = this.store.state.UploadFilesModule.allBoardData.colorBoards
|
||||
this.colorList = [{},{},{},{},{},{},{},{}]
|
||||
let hex
|
||||
colorList.forEach((ele, index) => {
|
||||
this.colorList[index] = ele
|
||||
@@ -681,10 +682,11 @@ export default defineComponent({
|
||||
this.colorList[index].gradient = ele.gradient
|
||||
this.colorList[index].name = ele.name
|
||||
});
|
||||
if(this.colorList[0]?.gradient && this.colorList[0]?.gradient?.selectIndex>-1 && this.colorList[0]?.gradient?.gradientShow){
|
||||
this.selectColor = {rgba:this.colorList[0].gradient.gradientList[0].rgba,hex:hex} //顔色选择器默认颜色
|
||||
this.selectIndex = colorList.length - 1
|
||||
if(this.colorList[colorList.length - 1]?.gradient && this.colorList[colorList.length - 1]?.gradient?.selectIndex>-1 && this.colorList[colorList.length - 1]?.gradient?.gradientShow){
|
||||
this.selectColor = {rgba:this.colorList[colorList.length - 1].gradient.gradientList[colorList.length - 1].rgba,hex:hex} //顔色选择器默认颜色
|
||||
}else{
|
||||
this.selectColor = {rgba:this.colorList[0].rgba,hex:hex} //顔色选择器默认颜色
|
||||
this.selectColor = {rgba:this.colorList[colorList.length - 1].rgba,hex:hex} //顔色选择器默认颜色
|
||||
}
|
||||
this.store.commit('setColorboardList',colorList)
|
||||
},
|
||||
|
||||
@@ -2185,6 +2185,7 @@ export default defineComponent({
|
||||
// padding-right:5rem;
|
||||
overflow: initial !important;
|
||||
position: relative;
|
||||
padding: .5rem 0;
|
||||
.page_content {
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -152,6 +152,11 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
if(index != -1){
|
||||
let num = data.selectObject.model.filter((item:any)=>item.level3Type == data.selectObject.sex).length
|
||||
if(num <= 1 && data.selectObject.model[index].level3Type == data.selectObject.sex){
|
||||
message.info(t('LibraryPage.jsContent14'))//最多选择四个
|
||||
return
|
||||
}
|
||||
if(list.length > 1){
|
||||
list.splice(index,1)
|
||||
}else{
|
||||
@@ -163,6 +168,7 @@ export default defineComponent({
|
||||
id:item.id,
|
||||
url:item.presignedUrl || item.url,
|
||||
type:item.type?item.type:data.systemUser?'System':'Library',
|
||||
level3Type:data.selectObject.sex,
|
||||
}
|
||||
list.push(model)
|
||||
}else{
|
||||
@@ -170,7 +176,13 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const deleteSelectModel = (index:number)=>{
|
||||
let num = data.selectObject.model.filter((item:any)=>item.level3Type == data.selectObject.sex).length
|
||||
if(num <= 1 && data.selectObject.model[index].level3Type == data.selectObject.sex){
|
||||
message.info(t('LibraryPage.jsContent14'))//最多选择四个
|
||||
return
|
||||
}
|
||||
let list = store.state.Workspace.probjects.model
|
||||
if(list.length > 1){
|
||||
list.splice(index,1)
|
||||
|
||||
@@ -241,7 +241,8 @@ export default defineComponent({
|
||||
url:item.url,
|
||||
id:item.mannequinRelationId,
|
||||
type:item.mannequinRelationType,
|
||||
collectionElementId:item.collectionId
|
||||
collectionElementId:item.collectionId,
|
||||
level3Type:item.level3Type
|
||||
})
|
||||
})
|
||||
store.commit('setProbject',{model:arr})
|
||||
|
||||
Reference in New Issue
Block a user