问题描述
我是 CropperJs 的新手。我正在开发一个 Angular 应用程序,我想显示 CropperJs 预览而不显示实际的裁剪器。
这可能吗?我怎么样?
这是我的代码:
HTML:
<div class="preview">
<img
#image
[src]="urlSafe"
/>
</div>
组件:
public cropper: any;
@ViewChild('image',{ static: false })
public image: ElementRef;
this.cropper = new Cropper(this.image.nativeElement,{ preview: '.preview' });
this.cropper.setAspectRatio(this.selectedRatio.value);
有人可以帮忙吗?
编辑:我在这里组织了一个stackblitz:https://stackblitz.com/edit/angular-ivy-xerqiw?file=src%2Fapp%2Fpreview%2Fpreview.component.ts
有人可以看看吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)