ohayolibs
Version:
Ohayo is a set of essential modules for ohayojp.
23 lines (18 loc) • 579 B
text/typescript
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd/message';
({
selector: 'st-widget-img',
template: ` <img nz-tooltip nzTooltipTitle="Client it" [src]="img" class="img" style="cursor: pointer" /> `,
host: {
'(click)': 'show()',
},
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class STImgWidget {
static readonly KEY = 'img';
img: string;
constructor(private msg: NzMessageService) {}
show(): void {
this.msg.info(`正在打开大图${this.img}……`);
}
}