前端搬砖人,伪设计师
暂时未有相关通用技术能力~
阿里云技能认证
详细说明## 背景 最近因为工作需要,研究了vscode的代码,看文档时发现其中提到了Dependency Injection,并且在类的构造函数中看到了这样的写法。 ``` javascript constructor( id: string, @IMessageService messageService: IMessageService, @IStorageService s
最近接到一个需求,其中需要把网络图片的链接转换为base64的地址。 其中,用canvas可以很方便的实现这个要求。 ``` js let basePath //图片base64地址 let $img = new Image() $img.onload = () => { let canvas = document.createElement('canvas') ca