|
|
@ -65,11 +65,13 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
canvasAssetObj //传入的素材属性对象
|
|
|
|
canvasAssetObj //传入的素材属性对象
|
|
|
|
isImgNumCss = false //控制上传文件input显隐
|
|
|
|
isImgNumCss = false //控制上传文件input显隐
|
|
|
|
mySwiper:any //轮播图实例
|
|
|
|
mySwiper:any //轮播图实例
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gallery |
|
|
|
setAssetsProperty(obj){ |
|
|
|
setAssetsProperty(obj){ |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
obj.PropertyInfos.forEach(item => { |
|
|
|
obj.PropertyInfos.forEach(item => { |
|
|
|
if(item.PropertyType == 4){ |
|
|
|
if(item.PropertyType == 4){ |
|
|
|
let gallery = new Viewer(document.getElementById('viewerjs'),{ |
|
|
|
this.gallery = new Viewer(document.getElementById('viewerjs'),{ |
|
|
|
url: 'data-original' |
|
|
|
url: 'data-original' |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -314,6 +316,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
this.imagesArr.push(imgObj) |
|
|
|
this.imagesArr.push(imgObj) |
|
|
|
this.canvasAssetObj.PropertyInfos.push(imgObj) |
|
|
|
this.canvasAssetObj.PropertyInfos.push(imgObj) |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.mySwiper = new Swiper('.swiper-container',{ |
|
|
|
this.mySwiper = new Swiper('.swiper-container',{ |
|
|
|
loop: false, |
|
|
|
loop: false, |
|
|
@ -330,9 +333,8 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// this.mySwiper.update()
|
|
|
|
|
|
|
|
this.mySwiper.slideTo(this.imagesArr.length - 1) |
|
|
|
this.mySwiper.slideTo(this.imagesArr.length - 1) |
|
|
|
|
|
|
|
this.gallery.update() |
|
|
|
}, 0); |
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
|
|
//判断上传素材属性图片是否超出数量 超出数量则隐藏input框
|
|
|
|
//判断上传素材属性图片是否超出数量 超出数量则隐藏input框
|
|
|
@ -378,6 +380,7 @@ export class CollectionToolsComponent implements OnInit { |
|
|
|
//更新swiper视图
|
|
|
|
//更新swiper视图
|
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.mySwiper.update(); |
|
|
|
this.mySwiper.update(); |
|
|
|
|
|
|
|
this.gallery.update() |
|
|
|
}, 0); |
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
|
|
this.canvasData.isChange = true |
|
|
|
this.canvasData.isChange = true |
|
|
|