[英]Object literal may only specify known properties, and 'buttons' does not exist in type 'Settings
Just make sure the dtOptions
is declared as any
.只需确保将
dtOptions
声明为any
。
You can find this comment on:https://l-lin.github.io/angular-datatables/#/extensions/buttons您可以在以下位置找到此评论:https://l-lin.github.io/angular-datatables/#/extensions/buttons
// Must be declared as "any", not as "DataTables.Settings"
dtOptions: any = {};
If the Type Settings
has been defined by you or your team, you must add the buttons
property as:如果您或您的团队已定义类型
Settings
,则必须将buttons
属性添加为:
buttons: any[];
Or或者
buttons?: any[];
To keep retro-compatibilty.保持复古兼容性。
If the type buttons
has been defined by a third part library, instead, there's something wrong in the way you're using it and you should check the documentation to fix it.相反,如果类型
buttons
已由第三方库定义,则说明您使用它的方式有问题,您应该查看文档以修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.