如何将输入类型应用于 ng2-smart-table

How to apply input type to ng2-smart-table

我想在 "add new" 按钮后应用一个 type='number' 按钮将显示相应的行,但只有字符串。 怎么办?

https://stackblitz.com/edit/angular-vxlqbr

默认情况下无法将类型编号添加到输入编辑器 https://github.com/akveo/ng2-smart-table/blob/master/projects/ng2-smart-table/src/lib/components/cell/cell-editors/input-editor.component.ts

但是您可以创建自定义编辑器。看例子 https://stackblitz.com/edit/angular-d1pt3d

此外,文档中有一个高级示例,请在此处查看 https://akveo.github.io/ng2-smart-table/#/examples/custom-editors-viewers