Browse Source

[完善]修改Viewer报错

master
邵佳豪 4 years ago
parent
commit
24a95eea5f
  1. 11
      src/app/ui/collection-tools/collection-tools.component.ts
  2. 10
      src/app/ui/plan/collection-tools.component.ts

11
src/app/ui/collection-tools/collection-tools.component.ts

@ -526,10 +526,13 @@ export class CollectionToolsComponent implements OnInit {
if(type == 1){
this.isProperty = true
setTimeout(() => {
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
this.gallery.update()
if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
this.gallery.update()
}
}, 0);
}else{

10
src/app/ui/plan/collection-tools.component.ts

@ -145,10 +145,12 @@ export class planComponent implements OnInit {
if(type == 1){
this.isProperty = true
setTimeout(() => {
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
this.gallery.update()
if(document.getElementById('viewerjs')){
this.gallery = new Viewer(document.getElementById('viewerjs'),{
url: 'data-original'
});
this.gallery.update()
}
}, 0);
}else{
this.isProperty = false

Loading…
Cancel
Save