【问题标题】:ng2-smart-table subscribe editng2-smart-table 订阅编辑
【发布时间】:2018-05-12 04:51:00
【问题描述】:

我想管理我的 ng2-smart-table 的编辑功能,但是这段代码对我不起作用,我有什么问题吗?

HTML

<ng2-smart-table [settings]="settings" [source]="source" (edit)="onEdit($event)"></ng2-smart-table>

组件

onEdit(event:any):void{
console.log("edit model");}

我可以添加新按钮并管理您的行为,我想知道我是否可以订阅该事件以及如何订阅的任何方式

【问题讨论】:

  • 函数 deleteConfirm、editConfirm 和 createConfirm 工作正常,但创建、编辑和删除却不行,为什么会这样?

标签: typescript ng2-smart-table


【解决方案1】:

发生这种情况是因为 ng2-smart-table 需要在其设置中修改模式值

settings = {
actions: {
  columnTitle: 'Actions'
},
mode: 'external',

【讨论】:

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