wmstable
v1.0.16
Published
this is a table component for wms.
Downloads
1
Readme
#使用说明 ##table-tree示例1--直接传入tree类型数据
components: {
wmsTable
},
data() {
return {
columnTypeProps: {
selection: {
selectable(row) {
return true;
// Boolean(row.splitOrder)
},
reserveSelection: true
},
tree: {
treeKey: 'orderId',
parentKey: 'parentOrderID',
childNumKey: 'hasChild',
childKey: 'children',
indentSize: 60
}
},
tableColumns: [
{label: '订单编号', prop: 'id', width: 190}
],
tableData: [{
"id": 1,
"label": "System",
"parent_id": null,
"depth": 0,
"child_num": 1,
"description": "System Manager",
"children": [{
"id": 2,
"label": "base",
"parent_id": 1,
"depth": 1,
"child_num": 1,
"description": "Base Manager",
"children": [{
"id": 3,
"label": "Menus",
"parent_id": 2,
"depth": 2,
"child_num": 0,
"description": "menu manager",
}, {
"id": 4,
"label": "Roles",
"parent_id": 2,
"depth": 2,
"child_num": 0,
"description": "Role Manager",
}, {
"id": 5,
"label": "Users",
"parent_id": 2,
"depth": 2,
"child_num": 0,
"description": "User Manager",
}]
}]
}, {
"id": 6,
"label": "Customs",
"parent_id": null,
"url": null,
"depth": 0,
"child_num": 0,
"description": "Custom Manager",
"children": [
// {
// "id": 7,
// "label": "CustomList",
// "parent_id": 6,
// "depth": 1,
// "child_num": 0,
// "description": "CustomList",
// }
]
}, {
"id": 8,
"label": "Templates",
"parent_id": null,
"url": null,
"depth": 0,
"child_num": 1,
"description": "Template Manager",
"children": [{
"id": 9,
"label": "TemplateList",
"parent_id": 8,
"depth": 1,
"child_num": 0,
"description": "Template Manager",
}]
}, {
"id": 10,
"label": "Bussiness",
"parent_id": null,
"url": null,
"depth": 0,
"child_num": 1,
"description": "Bussiness Manager",
"children": [{
"id": 11,
"label": "BussinessList",
"parent_id": 10,
"url": null,
"depth": 1,
"child_num": 2,
"description": "BussinessList",
"children": [{
"id": 12,
"label": "Currencies",
"parent_id": 11,
"depth": 2,
"child_num": 0,
"description": "Currencies",
}, {
"id": 13,
"label": "Dealtypes",
"parent_id": 11,
"depth": 2,
"child_num": 0,
"description": "Dealtypes",
}]
}, {
"id": 14,
"label": "Products",
"parent_id": 10,
"url": null,
"depth": 1,
"child_num": 2,
"description": "Products",
"children": [{
"id": 15,
"label": "ProductTypes",
"parent_id": 14,
"depth": 2,
"child_num": 0,
"description": "ProductTypes",
}, {
"id": 16,
"label": "ProductList",
"parent_id": 14,
"depth": 2,
"child_num": 0,
"description": "ProductList",
}]
}]
}]
};
},