修复页面刷新sketch会增加和颜色板块关闭后再次打开颜色异常问题

This commit is contained in:
X1627315083
2025-10-10 13:03:21 +08:00
parent f8ebfa8809
commit d35f24d817
12 changed files with 37 additions and 1281 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -507,7 +507,6 @@ export default defineComponent({
watch(
() => scene.value,
(newVal, oldVal) => {
console.log('scene-------------newVal', newVal)
if (newVal.value == 'extract') {
speed.speedData = {
...speed.extractList[0]
@@ -869,7 +868,7 @@ export default defineComponent({
}
data = {
generateType: 'text',
designType: 'collection',
designType: this.sketchboardList[0]?.designType?this.sketchboardList[0].designType:'collection',
collectionElementId: collectionElementId,
level1Type: this.upload.level1Type,
level2Type: level2Type,
@@ -1289,6 +1288,7 @@ export default defineComponent({
status: 'done',
...data,
errCode: 0,
designType:'Library',
imgUrl: data.url,
xhr: {
response: JSON.stringify({

View File

@@ -136,7 +136,7 @@ export default defineComponent({
data(){
return{
imgOpen:true,
setSketchTime:null as any,
}
},
watch: {
@@ -153,12 +153,18 @@ export default defineComponent({
newArr.push(newVal?.[index]?.id?newVal?.[index]?.id:newVal?.[index]?.sketchBoardIdd)
});
if(JSON.stringify(newArr)!=JSON.stringify(oldArr)){
this.setSketch()
clearTimeout(this.setSketchTime)
this.setSketchTime = setTimeout(()=>{
this.setSketch()
},500)
this.imgOpen = true
}
}else{
nextTick(()=>{
this.setSketch()
clearTimeout(this.setSketchTime)
this.setSketchTime = setTimeout(()=>{
this.setSketch()
},500)
this.imgOpen = true
})
}
@@ -201,6 +207,7 @@ export default defineComponent({
let sketchH = [0,0,0]
nextTick().then(async ()=>{
if(this.sketchList && this.sketchList!=null){
console.log(JSON.parse(JSON.stringify(this.sketch)),JSON.parse(JSON.stringify(this.sketchList)))
for (let i = 0; i < this.sketchList?.length; i++) {
let sketch1:any = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item0')[0]?.getBoundingClientRect()
let sketch2:any = document.getElementsByClassName('collection_review')[0]?.getElementsByClassName('lager_img_item1')[0]?.getBoundingClientRect()
@@ -232,6 +239,7 @@ export default defineComponent({
}
})
}
console.log(JSON.parse(JSON.stringify(this.sketch)))
this.imgOpen = true
this.store.commit('setshowSketchList', this.sketch)
}

View File

@@ -213,7 +213,6 @@ import { message, Upload, Modal } from "ant-design-vue";
onMounted(() => {
instance.appContext.config.globalProperties.$dropdownEvents.onClose(removePrintModel)
window.addEventListener('scroll', handleScroll, true)
console.log(instance,)
})
onUnmounted(() => {