bootstrap-table组合表头,bootstrap table实现横向合并

bootstrap-table组合表头,bootstrap table实现横向合并_第1张图片

1 $("#table").bootstrapTable({
 2             dataType: "json",
 3             method: 'get',
 4             contentType: "application/x-www-form-urlencoded",
 5             cache: false,
 6             url:"../data/mergeData.json",
 7             columns:[
 8 
 9                 [
10                     {
11                         "title": "洗衣机统计表",
12                         "halign":"center",
13                         "align":"center",
14                         "colspan": 5
15                     }
16                 ],
17                 [
18                     {
19                         field: 'name',
20                         title: "功能分组",
21                         valign:"middle",
22                         align:"center",
23                         colspan: 1,
24                         rowspan: 2
25                     },
26                     {
27                         title: "美的",
28                         valign:"middle",
29                         align:"center",
30                         colspan: 2,
31                         rowspan: 1
32                     },
33                     {
34                         title: "松下",
35                         valign:"middle",
36                         align:"center",
37                         colspan: 2,
38                         rowspan: 1
39                     }
40                 ],
41                 [
42                     {
43                         field: 'mideaNum',
44                         title: '数量',
45                         valign:"middle",
46                         align:"center"
47                     },
48                     {
49                         field: 'mideaPercent',
50                         title: '占比',
51                         valign:"middle",
52                         align:"center"
53                     },
54                     {
55                         field: 'panasonicNum',
56                         title: '数量',
57                         valign:"middle",
58                         align:"center"
59                     },
60                     {
61                         field: 'panasonicPercent',
62                         title: '占比',
63                         valign:"middle",
64                         align:"center"
65                     }
66                 ]
67             ]
68         })

你可能感兴趣的:(bootstrap-table组合表头,bootstrap table实现横向合并)