bookstrap table怎么创建多重复合表头

bookstrap table怎么创建多重复合表头,想在部门那一列列头下面加上部门编号,部门名称。如何通多js的方式创建?
就是类似下面这种效果,多行列头
图片描述

var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                importUrl: prefix + "/importData",
                importTemplateUrl: prefix + "/importTemplate",
                sortName: "createTime",
                sortOrder: "desc",
                modalName: "通用表格",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'bgId', 
                    title : '表格编号',
                    visible: false
                },
                {
                    field : 'userName', 
                    title : '用户名称'
                },
                {
                    field : 'userName', 
                    title : '部门'
                }]
            };
阅读 2.3k
1 个回答
 columns: [
    [{
      field: 'state',
      checkbox: true,
      rowspan: 2,
      align: 'center',
      valign: 'middle'
    }, {
      title: 'Item ID',
      field: 'id',
      rowspan: 2,
      align: 'center',
      valign: 'middle',
    }, {
      title: 'Item Detail',
      colspan: 3,
      align: 'center'
    }],
    [{
      field: 'name',
      title: 'Item Name',
      align: 'center'
    }, {
      field: 'price',
      title: 'Item Price',
      align: 'center',
    }, {
      field: 'operate',
      title: 'Item Operate',
      align: 'center',
     
    }]
  ]
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题