2.7毕设
2020-02-07 18:29 Robortxin 阅读(136) 评论(0) 编辑 收藏 举报EasyUI for Angular是基于原生的Angular 5之上构建的,不需要其他外部JavaScript库。
<eui-datagrid [data]="data" [clickToEdit]="true" editMode="row" style="height:250px"> <eui-grid-column field="itemid" title="Item ID" [editable]="true"></eui-grid-column> <eui-grid-column field="name" title="Name" [editable]="true"></eui-grid-column> <eui-grid-column field="listprice" title="List Price" align="right" [editable]="true"> <ng-template euiEditTemplate let-row="row"> <eui-numberbox [(ngModel)]="row.listprice" precision="1"></eui-numberbox> </ng-template> </eui-grid-column> <eui-grid-column field="unitcost" title="Unit Cost" align="right" [editable]="true"> <ng-template euiEditTemplate let-row="row"> <eui-numberbox [(ngModel)]="row.unitcost"></eui-numberbox> </ng-template> </eui-grid-column> <eui-grid-column field="attr" title="Attribute" width="30%" [editable]="true"></eui-grid-column> <eui-grid-column field="status" title="Status" align="center" [editable]="true"> <ng-template euiEditTemplate let-row="row"> <eui-switchbutton [(ngModel)]="row.status" style="max-width:80px" onText="true" offText="false"></eui-switchbutton> </ng-template> </eui-grid-column> </eui-datagrid>