This commit is contained in:
X1627315083
2023-12-18 16:04:05 +08:00
parent 8f88867fb7
commit 3eba91f160

View File

@@ -97,15 +97,20 @@ export default defineComponent({
watch: { watch: {
sketchList:{ sketchList:{
handler(newVal:any,oldVal:any){ handler(newVal:any,oldVal:any){
console.log(oldVal,newVal);
console.log(this.sketchList );
// this.sketchList = [] // this.sketchList = []
// this.sketch = [[],[],[]] // this.sketch = [[],[],[]]
// this.sketchList = this.allBoardData.sketchboardFiles // this.sketchList = this.allBoardData.sketchboardFiles
if(oldVal){ if(oldVal){
if(JSON.stringify(newVal)!=JSON.stringify(oldVal)){ if(JSON.stringify(newVal)!=JSON.stringify(oldVal)){
this.setSketch() this.setSketch()
this.imgOpen = true
} }
}else{ }else{
this.setSketch() this.setSketch()
this.imgOpen = true
} }
@@ -132,7 +137,7 @@ export default defineComponent({
sketch2.num = 1 sketch2.num = 1
sketch3.num = 2 sketch3.num = 2
if(this.sketchList && this.sketchList!=null){ if(this.sketchList && this.sketchList!=null){
for (let i = 0; i < this.sketchList.length; i++) { for (let i = 0; i < this.sketchList?.length; i++) {
let arr = [sketch1,sketch2,sketch3] let arr = [sketch1,sketch2,sketch3]
let image = new Image() let image = new Image()
image.src = this.sketchList[i].urlWithWhiteSide image.src = this.sketchList[i].urlWithWhiteSide