瀏覽代碼

fix: oss example

MetaPunkGames 1 月之前
父節點
當前提交
a9c29e634b
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      projects/textbook/src/app/comp-upload/example-upload/example-upload.component.ts

+ 8 - 1
projects/textbook/src/app/comp-upload/example-upload/example-upload.component.ts

@@ -1,5 +1,6 @@
 import { Component, OnInit } from '@angular/core';
 import { CompUploadComponent } from '../comp-upload.component';
+import { ProvierOssAli } from '../provider-oss-aliyun';
 
 @Component({
   selector: 'app-example-upload',
@@ -10,11 +11,17 @@ import { CompUploadComponent } from '../comp-upload.component';
 })
 export class ExampleUploadComponent  implements OnInit {
 
-  constructor() { }
+  ossProvider: { upload: any, get: any } | undefined;
+  constructor() { 
+    this.ossProvider = new ProvierOssAli();
+  }
 
   ngOnInit() {}
 
   upload(ev:any){
     console.log(ev)
   }
+  get(url:string){
+    this.ossProvider?.get(url);
+  }
 }