File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,15 @@ protected override async Task TriggerOnChanged(UploadFile file)
150150 await base . TriggerOnChanged ( file ) ;
151151 }
152152
153+ /// <summary>
154+ /// 预览当前头像方法
155+ /// </summary>
156+ /// <returns></returns>
153157 public async Task Preview ( )
154158 {
155159 if ( ShowPreviewList )
156160 {
157-
161+ await InvokeVoidAsync ( "preview" , PreviewerId , 0 ) ;
158162 }
159163 }
160164
Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ export function init(id) {
8484 } )
8585}
8686
87+ export function preview ( previewerId , index ) {
88+ const prev = Data . get ( previewerId ) ;
89+ if ( prev ) {
90+ prev . viewer . show ( index ) ;
91+ }
92+ }
93+
8794export async function getPreviewUrl ( id , fileName ) {
8895 let url = '' ;
8996 const upload = Data . get ( id ) ;
You can’t perform that action at this time.
0 commit comments