1.0.1 • Published 5 years ago

jun_materials-interacting-table v1.0.1

Weekly downloads
7
License
MIT
Repository
-
Last release
5 years ago

带数据交互表格

jun_materials-interacting-table

自定义数据的表格

API

参数名说明必填类型默认值备注
tableHead表theadArray-
tableBody表tbodyArray-
isControl表格行控制boolfalse
addRow添加行function-
deleteRow删除行function-
classNameclassstring-
stylestyleobject

数据样例:

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)
      }
    }
    ]
1.0.1

5 years ago

1.0.0

5 years ago