<st #st [columns]="columns" [data]="list">
<ng-template st-row="plan" let-i>
{{i.planname}}
</ng-template>
</st>
import { Component, OnInit } from '@angular/core';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
})
export class DashboardComponent implements OnInit {
constructor(private http: _HttpClient, private msg: NzMessageService) { }
public i: any;
list = [
{ apply: '1111', planname: '2222', age: '18', ddd: 'rere' },
{ apply: '2222', planname: '233', age: '18', ddd: 'rere' },
{ apply: '3333', planname: '222332', age: '18', ddd: 'rere' },
]
columns: STColumn[] = [
{ title: '企业', index: 'apply' },
{ title: '名称', render: 'plan', index: 'planname' },
{ title: '年龄', index: 'age' },
{ title: '年龄', index: 'ddd' },
{
title: '操作',
buttons: [
{
text: '删除',
click: (record, _modal, comp) => {
this.msg.success(`成功删除【${record.name}】`);
comp!.removeRow(record);
},
}
]
}
]
ngOnInit(): void {
}
}