<kendo-colorpicker
[view]="view"
[format]="format"
[paletteSettings]="settings"
[(value)]="color"
[popupSettings]="{ appendTo: 'component'}"
>
</kendo-colorpicker>
错误 - 遇到此问题错误:container.createComponent 不是函数
https://stackblitz.com/edit/angular-khdydo-yqbeep?file=app%2Fapp.component.ts
由于您已经位于根组件
AppComponent
,因此只需删除[popupSettings]="{ appendTo: 'component'}"
,颜色选择器就可以正常工作!
<kendo-colorpicker
[view]="view"
[format]="format"
[paletteSettings]="settings"
[(value)]="color"
>
</kendo-colorpicker>