1.0.1 • Published 5 years ago
jun_materials-interacting-table v1.0.1
带数据交互表格
jun_materials-interacting-table
自定义数据的表格
API
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|---|---|---|---|---|
tableHead | 表thead | 是 | Array | - | |
tableBody | 表tbody | 是 | Array | - | |
isControl | 表格行控制 | 否 | bool | false | |
addRow | 添加行 | 否 | function | - | |
deleteRow | 删除行 | 否 | function | - | |
className | class | 否 | string | - | |
style | style | 否 | object |
数据样例:
tableHead
tableHead : [
{title:'标题',key:'col1',style:{width:160}},
{title:'字段',key:'col2',style:{width:200}},
{title:'关系',key:'col3',style:{width:180}},
{title:'值',key:'col4'},
]
tableBody:
tableBody: [
{
col1:{
inputType:'self',
render:'我的数据二'
},
col2:{
inputType:'select',
groups:SelectArray1,
onChange:(value,pos_arr)=>this.onChangeTableItem(value,pos_arr),
},
col3:{
inputType:'select',
groups:SelectArray2,
onChange:(value,pos_arr)=>this.onChangeTableItem(value,pos_arr)
},
col4:{
inputType:'input',
onChange:(value,pos_arr)=>this.onChangeTableItem(value,pos_arr)
}
}
]