From c8fe9c36582aeb28d37515b2e5875ac6039104a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Thu, 2 Jul 2020 23:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin-article.component.html | 2 +- .../admin-article/admin-article.component.ts | 28 +++++++++---------- .../admin-comment.component.html | 8 ++++-- .../admin-comment/admin-comment.component.ts | 22 +++++++++------ .../admin-comment/admin-comment.module.ts | 2 ++ 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/app/view/admin/admin-article/admin-article.component.html b/src/app/view/admin/admin-article/admin-article.component.html index 6173665..8846d0b 100644 --- a/src/app/view/admin/admin-article/admin-article.component.html +++ b/src/app/view/admin/admin-article/admin-article.component.html @@ -1,6 +1,6 @@ + {{value}} {{value}} + + + + diff --git a/src/app/view/admin/admin-comment/admin-comment.component.ts b/src/app/view/admin/admin-comment/admin-comment.component.ts index 8fa9c7a..e7250e8 100644 --- a/src/app/view/admin/admin-comment/admin-comment.component.ts +++ b/src/app/view/admin/admin-comment/admin-comment.component.ts @@ -50,16 +50,16 @@ export class AdminCommentComponent implements OnInit { ngOnInit(): void { this.headData = [ - {fieldName: '主键', fieldValue: 'id', show: false, primaryKey: true}, - {fieldName: '评论路径', fieldValue: 'pagePath', show: true}, - {fieldName: '评论创建者昵称', fieldValue: 'fromUser.displayName', show: true}, - {fieldName: '评论接收者昵称', fieldValue: 'toUser.displayName', show: true}, - {fieldName: '评论内容', fieldValue: 'content', show: false}, - {fieldName: '评论日期', fieldValue: 'date', show: true}, - {fieldName: '父评论id', fieldValue: 'pid', show: false}, - {fieldName: '状态', fieldValue: 'status', show: true}, + {title: '主键', fieldValue: 'id', show: false, primaryKey: true}, + {title: '评论路径', fieldValue: 'pagePath', show: true}, + {title: '评论创建者昵称', fieldValue: 'fromUser.displayName', show: true}, + {title: '评论内容', fieldValue: 'content', show: true}, + {title: '评论接收者昵称', fieldValue: 'toUser.displayName', show: true}, + {title: '评论日期', fieldValue: 'date', show: true}, + {title: '父评论id', fieldValue: 'pid', show: false}, + {title: '状态', fieldValue: 'status', show: true}, { - fieldName: '操作', + title: '操作', fieldValue: '', show: true, isActionColumns: true, @@ -118,4 +118,8 @@ export class AdminCommentComponent implements OnInit { // this.editInfo.content.responseId = data.responseId; this.editInfo.editFocus = true; } + + textChange(value: { value: string; originalValue: string; changed: boolean }) { + console.log(value) + } } diff --git a/src/app/view/admin/admin-comment/admin-comment.module.ts b/src/app/view/admin/admin-comment/admin-comment.module.ts index c253b84..4159629 100644 --- a/src/app/view/admin/admin-comment/admin-comment.module.ts +++ b/src/app/view/admin/admin-comment/admin-comment.module.ts @@ -4,6 +4,7 @@ import {RouterModule} from '@angular/router'; import {AdminCommentComponent} from './admin-comment.component'; import {CommonTableModule} from '../components/common-table/common-table.module'; import {NzTagModule} from 'ng-zorro-antd'; +import {EditableTagModule} from '../components/editable-tag/editable-tag.module'; @NgModule({ @@ -15,6 +16,7 @@ import {NzTagModule} from 'ng-zorro-antd'; RouterModule.forChild([{path: '', component: AdminCommentComponent}]), CommonTableModule, NzTagModule, + EditableTagModule, ] }) export class AdminCommentModule {