在項目中本身封裝了一個 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>