【问题标题】:How to apply input type to ng2-smart-table如何将输入类型应用于 ng2-smart-table
【发布时间】:2020-02-06 20:53:18
【问题描述】:

我想在“添加新”按钮后应用 type='number' 将显示相应的行,但只有字符串。 怎么办?

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

【问题讨论】:

    标签: angular ng2-smart-table


    【解决方案1】:

    默认情况下无法将类型编号添加到输入编辑器 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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-08
      • 1970-01-01
      • 2019-01-08
      • 2020-01-03
      • 1970-01-01
      • 2018-09-21
      相关资源
      最近更新 更多