文本字段未在 ng2-smart-table 中显示
Textfield not displaying in ng2-smart-table
我正在尝试在 ng2-smart-table 组件的列中显示文本字段。
参考 ng2-smart-table 文档,但仍未显示文本字段。你能帮忙解决这个问题吗?
在 component.ts 文件中:
setting = {
multimode:true,
hideSubHeader:true,
actions: false,
columns: {
NAME:
{
title: 'Name'
},
VALUE: {
title: 'Value',
type:'text',
editor:{
type:'text'
}
}
},
attr:
{
class: 'table table-bordered'
}
}
在 component.html 文件中:
<ng2-smart-table [settings]="setting" [source]="ConfigureSource" ></ng2-smart-table>
在 ConfigureSource.ts 文件中:
export const ConfigureData: Array<any> = [
{
"Name": "John",
"Value": ""
},
{
"Name": "Sam",
"Value": ""
}
];
尝试设置操作:
actions: { edit: true, position: 'right' }
并且 列可编辑为 true
我正在尝试在 ng2-smart-table 组件的列中显示文本字段。
参考 ng2-smart-table 文档,但仍未显示文本字段。你能帮忙解决这个问题吗?
setting = {
multimode:true,
hideSubHeader:true,
actions: false,
columns: {
NAME:
{
title: 'Name'
},
VALUE: {
title: 'Value',
type:'text',
editor:{
type:'text'
}
}
},
attr:
{
class: 'table table-bordered'
}
}
在 component.html 文件中:
<ng2-smart-table [settings]="setting" [source]="ConfigureSource" ></ng2-smart-table>
在 ConfigureSource.ts 文件中:
export const ConfigureData: Array<any> = [
{
"Name": "John",
"Value": ""
},
{
"Name": "Sam",
"Value": ""
}
];
尝试设置操作:
actions: { edit: true, position: 'right' }
并且 列可编辑为 true