Skip to content

Commit

Permalink
chore: 移动位置
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Nov 2, 2023
1 parent 77d2bd8 commit a8a47fb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 32 deletions.
32 changes: 31 additions & 1 deletion packages/s2-react/playground/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isUpDataValue, type Columns } from '@antv/s2';
import { isUpDataValue, type Columns, customMerge } from '@antv/s2';
import type { S2DataConfig, ThemeCfg } from '@antv/s2';
import { getBaseSheetComponentOptions } from '@antv/s2-shared';
import type { SliderSingleProps } from 'antd';
Expand Down Expand Up @@ -46,6 +46,36 @@ export const pivotSheetDataCfg: S2DataConfig = {
fields,
};

export const pivotSheetDataCfgForCompactMode = customMerge(pivotSheetDataCfg, {
data: [
...pivotSheetDataCfg.data,
{
province: '浙江',
city: '杭州',
type: '笔',
price: '11111111',
},
{
province: '浙江',
city: '杭州',
type: '纸张',
price: '2',
},
{
province: '浙江',
city: '舟山',
type: '笔',
price: '2',
},
{
province: '浙江',
city: '舟山',
type: '纸张',
price: '133.333',
},
],
});

export const s2Options: SheetComponentOptions = {
debug: true,
width: 600,
Expand Down
33 changes: 2 additions & 31 deletions packages/s2-react/playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import {
tableSheetMultipleColumns,
tableSheetSingleColumns,
s2ThemeConfig,
pivotSheetDataCfgForCompactMode,
} from './config';
import './index.less';
import { ResizeConfig } from './resize';
Expand Down Expand Up @@ -334,37 +335,7 @@ function MainLayout() {
},
},
});
setDataCfg(
customMerge(pivotSheetDataCfg, {
data: [
...pivotSheetDataCfg.data,
{
province: '浙江',
city: '杭州',
type: '笔',
price: '11111111',
},
{
province: '浙江',
city: '杭州',
type: '纸张',
price: '2',
},
{
province: '浙江',
city: '舟山',
type: '笔',
price: '2',
},
{
province: '浙江',
city: '舟山',
type: '纸张',
price: '133.333',
},
],
}),
);
setDataCfg(pivotSheetDataCfgForCompactMode);
break;

default:
Expand Down

0 comments on commit a8a47fb

Please sign in to comment.