如何实现开关列头分组的同时还能合并头?
希望如图效果,上面增加一个合并的头。
列分组我是参考这里:https://demo.grapecity.com/wijmo/demos/Grid/Columns/ColumnGroups/vue
感谢分享和反馈!解决速度 :hjyzw: 搞定了 header数据这样改就行了
[
{ header: 'header', align: 'center' columns: [
{ binding: 'name', header: '銘柄', width: 150 },
{ binding: 'currency', header: '通貨', width: 80, align: 'center' },
{ header: '実績', align: 'center', collapseTo: 'perf.ytd', columns: [
{ binding: 'perf.ytd', header: '年初来', format: 'p2', width: 100, cssClass: 'main-column' },
{ binding: 'perf.m1', header: '1ヶ月', format: 'p2', width: 80 },
{ binding: 'perf.m6', header: '6ヶ月', format: 'p2', width: 80 },
{ binding: 'perf.m12', header: '1年', format: 'p2', width: 80 },
]},
{ header: '割当', align: 'center', collapseTo: 'alloc.amount', columns: [
{ binding: 'alloc.stock', header: '株式', format: 'p0', width: 80, cellTemplate: allocTemplate },
{ binding: 'alloc.bond', header: '債券', format: 'p0', width: 80, cellTemplate: allocTemplate },
{ binding: 'alloc.cash', header: '現金', format: 'p0', width: 80, cellTemplate: allocTemplate },
{ binding: 'alloc.other', header: 'その他', format: 'p0', width: 80, cellTemplate: allocTemplate },
{ binding: 'alloc.amount', header: '金額', format: 'c0', width: 100, cssClass: 'main-column', cellTemplate: amountTemplate }
]}
]}
]
页:
[1]