bixi
Version:
企业级中后台前端解决方案
19 lines (15 loc) • 674 B
text/typescript
import { Directive, Host, Input, OnInit, TemplateRef } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { EBixiCustomTplType } from '../table.type';
import { ColTemplateService } from './col-template.service';
({
selector: '[bixi-row]'
})
export class BixiRowDirective implements OnInit {
('bixi-row') tplName: string; // 获取定义的列名
() type: string = EBixiCustomTplType.body;
constructor(private ref: TemplateRef<NzSafeAny>, () private colTemplateService: ColTemplateService) { }
ngOnInit() {
this.colTemplateService.add(this.tplName, this.ref, this.type as EBixiCustomTplType);
}
}