File tree Expand file tree Collapse file tree
src/renderer/components/table/basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 < button nz-button nzType ="primary " (click) ="handlerDialog(true) " style ="margin-top: -22px; float: right; ">
33 < i class ="fa fa-external-link-square "> </ i > {{'common.export'|translate}}
44 </ button >
5- <!-- <nz-dropdown-menu #export="nzDropdownMenu">-->
6- <!-- <ul nz-menu>-->
7- <!-- <li nz-menu-item >{{'common.csv'|translate}}</li>-->
8- <!-- </ul>-->
9- <!-- </nz-dropdown-menu>-->
10- < ngx-table [id] ="id " [data] ="value.columns "
11- [configuration] ="configuration " [columns] ="headers ">
5+ < ngx-table [id] ="id " [data] ="value.columns " [configuration] ="configuration " [columns] ="headers ">
6+ < ng-template let-row let-index ="index ">
7+ < td *ngFor ="let header of headers " style ="max-width: 300px; "
8+ ellipsis [ellipsis-content] ="row[header.key] "
9+ (ellipsis-click-more) ="handlerShowMoreEllipsis(row[header.key]) ">
10+ {{row[header.key]}}
11+ </ td >
12+ </ ng-template >
1213 </ ngx-table >
1314</ div >
1415< ng-template #notHasValues >
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { ExportToCsv } from 'export-to-csv';
55import { Md5 } from 'ts-md5' ;
66import { TableExportModel } from "@renderer/components/table/basic/table.export.model" ;
77import { StringUtils } from "@renderer/utils/string.utils" ;
8+ import { TranslateService } from "@ngx-translate/core" ;
9+ import { NzModalService } from "ng-zorro-antd/modal" ;
810
911@Component ( {
1012 selector : 'app-component-basic-table' ,
@@ -18,7 +20,8 @@ export class BasicTableComponent extends BaseComponent implements AfterViewInit
1820 public id : string ;
1921 exportInfo : TableExportModel ;
2022
21- constructor ( ) {
23+ constructor ( private translateService : TranslateService ,
24+ private modalService : NzModalService ) {
2225 super ( ) ;
2326 this . configuration = { ...DefaultConfig } ;
2427 this . configuration . horizontalScroll = true ;
@@ -68,4 +71,14 @@ export class BasicTableComponent extends BaseComponent implements AfterViewInit
6871 const csvExporter = new ExportToCsv ( options ) ;
6972 csvExporter . generateCsv ( this . value . columns ) ;
7073 }
74+
75+ handlerShowMoreEllipsis ( value : any ) : void {
76+ this . modalService . info ( {
77+ nzWidth : '80%' ,
78+ nzKeyboard : false ,
79+ nzMaskClosable : false ,
80+ nzOkText : this . translateService . instant ( 'common.ok' ) ,
81+ nzContent : value . toString ( )
82+ } ) ;
83+ }
7184}
You can’t perform that action at this time.
0 commit comments