您好,从您截图的代码片段,没发现具体问题的原因。
我这边编写了一个Demo,您参考一下:
- import 'bootstrap.css';
- import '@grapecity/wijmo.styles/wijmo.css';
- import './styles.css';
- import * as wjGrid from '@grapecity/wijmo.grid';
- import * as wjGridGrouppanel from '@grapecity/wijmo.grid.grouppanel';
- //
- document.readyState === 'complete' ? init() : window.onload = init;
- //
- function init() {
- //
- // generate some random data
- var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','), products = 'Phones,Computers,Cameras,Stereos'.split(','), data = [];
- for (var i = 0; i < 200; i++) {
- data.push({
- id: i,
- country: countries[i % countries.length],
- product: products[i % products.length],
- downloads: Math.round(100 + Math.random() * 10000),
- sales: Math.random() * 10000,
- expenses: Math.random() * 5000,
- });
- }
- //
- // create group panel grid
- var theGrid = new wjGrid.FlexGrid('#theGrid', {
- itemsSource: data,
- groupHeaderFormat: "自定义{name}自定义: 自定义<b>{value}自定义</b>自定义({count:n0} 自定义格式)自定义"
- });
- //
- // create the group panel
- var theGroupPanel = new wjGridGrouppanel.GroupPanel('#theGroupPanel', {
- placeholder: 'Drag columns here to create groups',
- grid: theGrid
- });
- }
复制代码
https://demo.grapecity.com.cn/wi ... g/GroupPanel/purejs
如果仍解决不了,请您打包一个能运行的Demo,上传附件。我帮您debug排查。 |