在项目中本身封装了一个 select
组件css
@Component({ selector: '[app-choosen-select]', templateUrl: './selectcommon.component.html', styleUrls: ['./style.scss'] }) export class SelectCommonComponent implements OnInit, AfterViewInit, OnDestroy {
ts编译报错。html
修改tslint.json
json
"component-selector": [ true, "element", "app", "kebab-case" ],
改成app
"component-selector": [ true, ["element","attribute"], "app", "kebab-case" ],
<div app-choosen-select [options]="groupOptions" class="cpu-select-round"></div>