我在 ngx-datatable 中向列添加多个道具时遇到了一点问题:
columns = [
{ prop: 'semesterName', name: 'סמסטר', resizeable: false },
{ prop: 'eventName', name: 'מפגש', resizeable: false },
{ prop: 'when', name: 'מועד מפגש', resizeable: false },
{ prop: 'lecturerName', name: 'מרצה', resizeable: false },
{ prop: 'hugName', name: 'חוג', resizeable: false },
];
我需要在一列中显示两个道具。就像一列中的“eventName”和“when”。
该模型:
export class Course {
semester: string;
semesterName: string;
courseObject: string;
course: string;
courseName: string;
eventObject: string;
event: string;
eventName: string;
hugName: string;
dayOfWeek: string;
dayOfWeekNum: string;
where: string;
when: string;
lecturerName: string;
lecturerEMail: string;
authMembers: number;
eventStatus: string;}
的HTML:
<ngx-datatable[columns]="columns" [rows]="courses">
</ngx-datatable>
谢谢!