Files
blog-frontEnd/src/app/view/admin/admin-comment/admin-comment.component.html
禾几海 68b380906a style: format project
[skip ci]
2020-11-22 22:00:09 +08:00

45 lines
2.1 KiB
HTML

<common-table #commonTableComponent
[headData]="headData"
[request]="request"
[template]="{status:{temp:status,param:{'0':' 正常 ','3':'已删除'}},content:{temp:content}}"
cardTitle="评论管理">
</common-table>
<ng-template #status let-originValue="originValue" let-value="value">
<nz-tag *ngIf="originValue==0" nzColor="geekblue">{{value}}</nz-tag>
<nz-tag *ngIf="originValue==3" nzColor="#f50">{{value}}</nz-tag>
</ng-template>
<ng-template #content let-data="data" let-value="value">
<editable-tag #editableTagComponent
(modalOK)="textChange($event,data)"
[key]="data.id"
[showBorder]="false"
[showConfirmModal]="true"
[text]="value">
</editable-tag>
</ng-template>
<nz-modal (nzOnOk)="modalData.visible=false" [(nzVisible)]="modalData.visible" [nzCancelText]="null" [nzClosable]="true"
nzTitle="查看">
<ng-template #commentTemplateRef let-comment="comment">
<nz-comment [nzAuthor]="comment && comment.fromUser.displayName" [nzDatetime]="comment&&comment.date">
<nz-avatar [nzSrc]="comment && comment.fromUser && comment.fromUser.avatarImgUrl" nz-comment-avatar
nzIcon="user"></nz-avatar>
<nz-comment-content>
<p>{{ comment && comment.content }}</p>
</nz-comment-content>
<!-- <nz-comment-action>Reply to</nz-comment-action>-->
<ng-container *ngIf="comment&&comment.children && comment.children.length">
<ng-template [ngForOf]="comment&&comment.children" let-child ngFor>
<ng-template [ngTemplateOutletContext]="{ comment: child }" [ngTemplateOutlet]="commentTemplateRef">
</ng-template>
</ng-template>
</ng-container>
</nz-comment>
</ng-template>
<ng-template [ngTemplateOutletContext]="{ comment: modalData.comment }" [ngTemplateOutlet]="commentTemplateRef">
</ng-template>
</nz-modal>