Skip to content

Commit 0c695b9

Browse files
committed
chore: 润湿文档 & s2options => s2Options
1 parent 7c9f143 commit 0c695b9

37 files changed

+132
-129
lines changed

README.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const s2DataConfig = {
144144
### 2. Options Preparation
145145

146146
```ts
147-
const s2options = {
147+
const s2Options = {
148148
width: 600,
149149
height: 600,
150150
}
@@ -161,7 +161,7 @@ import { PivotSheet } from '@antv/s2';
161161

162162
const container = document.getElementById('container');
163163

164-
const s2 = new PivotSheet(container, s2DataCfg, s2options)
164+
const s2 = new PivotSheet(container, s2DataCfg, s2Options)
165165

166166
s2.render()
167167
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const s2DataConfig = {
140140
### 2. 配置项准备
141141

142142
```ts
143-
const s2options = {
143+
const s2Options = {
144144
width: 600,
145145
height: 600,
146146
}
@@ -157,7 +157,7 @@ import { PivotSheet } from '@antv/s2';
157157

158158
const container = document.getElementById('container');
159159

160-
const s2 = new PivotSheet(container, s2DataConfig, s2options)
160+
const s2 = new PivotSheet(container, s2DataConfig, s2Options)
161161

162162
s2.render()
163163
```

packages/s2-core/README.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const s2DataConfig = {
144144
### 2. Options Preparation
145145

146146
```ts
147-
const s2options = {
147+
const s2Options = {
148148
width: 600,
149149
height: 600,
150150
}
@@ -161,7 +161,7 @@ import { PivotSheet } from '@antv/s2';
161161

162162
const container = document.getElementById('container');
163163

164-
const s2 = new PivotSheet(container, s2DataCfg, s2options)
164+
const s2 = new PivotSheet(container, s2DataCfg, s2Options)
165165

166166
s2.render()
167167
```

packages/s2-core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const s2DataConfig = {
140140
### 2. 配置项准备
141141

142142
```ts
143-
const s2options = {
143+
const s2Options = {
144144
width: 600,
145145
height: 600,
146146
}
@@ -157,7 +157,7 @@ import { PivotSheet } from '@antv/s2';
157157

158158
const container = document.getElementById('container');
159159

160-
const s2 = new PivotSheet(container, s2DataConfig, s2options)
160+
const s2 = new PivotSheet(container, s2DataConfig, s2Options)
161161

162162
s2.render()
163163
```

packages/s2-core/__tests__/bugs/issue-292-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import { getContainer } from '../util/helpers';
88
import * as mockDataConfig from '../data/data-issue-292.json';
99
import { PivotSheet } from '@/sheet-type';
1010

11-
const s2options = {
11+
const s2Options = {
1212
width: 800,
1313
height: 600,
1414
};
1515

1616
describe('Multi-Values Test', () => {
17-
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2options);
17+
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2Options);
1818
s2.render();
1919
test('should get right order of multi-values', () => {
2020
const colLeafNodes = s2.facet.layoutResult.colLeafNodes;

packages/s2-core/__tests__/bugs/issue-368-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as mockDataConfig from '../data/data-issue-368.json';
99
import { PivotSheet } from '@/sheet-type';
1010
import { Node } from '@/facet/layout/node';
1111

12-
const s2options = {
12+
const s2Options = {
1313
width: 800,
1414
height: 600,
1515
totals: {
@@ -31,7 +31,7 @@ const s2options = {
3131
};
3232

3333
describe('Total Cells Rendering Test', () => {
34-
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2options);
34+
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2Options);
3535
s2.render();
3636
test('should get right SubTotals position', () => {
3737
const layoutResult = s2.facet.layoutResult;

packages/s2-core/__tests__/bugs/issue-372-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { PivotSheet } from '@/sheet-type';
1111
import { Node } from '@/facet/layout/node';
1212
import { S2Options } from '@/common';
1313

14-
const s2options: S2Options = {
14+
const s2Options: S2Options = {
1515
width: 800,
1616
height: 600,
1717
totals: {
@@ -28,7 +28,7 @@ const s2options: S2Options = {
2828
describe('GrandTotal Cells Rendering Test', () => {
2929
let s2: PivotSheet;
3030
beforeEach(() => {
31-
s2 = new PivotSheet(getContainer(), mockDataConfig, s2options);
31+
s2 = new PivotSheet(getContainer(), mockDataConfig, s2Options);
3232
s2.render();
3333
});
3434
test('should get right height of GrandTotal node', () => {

packages/s2-core/__tests__/bugs/issue-446-spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import * as mockDataConfig from '../data/data-issue-446.json';
99
import { TableSheet } from '@/sheet-type';
1010
import { copyData } from '@/utils';
1111

12-
const s2options = {
12+
const s2Options = {
1313
width: 800,
1414
height: 600,
1515
showSeriesNumber: true,
1616
};
1717

1818
describe('export', () => {
1919
test('should export correct data with showSeriesNumber', () => {
20-
const s2 = new TableSheet(getContainer(), mockDataConfig, s2options);
20+
const s2 = new TableSheet(getContainer(), mockDataConfig, s2Options);
2121
s2.render();
2222
const data = copyData(s2, '\t');
2323

@@ -29,7 +29,7 @@ describe('export', () => {
2929

3030
test('should export correct data without showSeriesNumber', () => {
3131
const s2 = new TableSheet(getContainer(), mockDataConfig, {
32-
...s2options,
32+
...s2Options,
3333
showSeriesNumber: false,
3434
});
3535
s2.render();

packages/s2-core/__tests__/bugs/issue-511-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import { getContainer } from '../util/helpers';
77
import * as mockDataConfig from '../data/data-issue-511.json';
88
import { PivotSheet } from '@/sheet-type';
99

10-
const s2options = {
10+
const s2Options = {
1111
width: 800,
1212
height: 600,
1313
};
1414

1515
describe('Data order Test', () => {
16-
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2options);
16+
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2Options);
1717
s2.render();
1818
test('should get right order of rendering data', () => {
1919
const rowLeafNodes = s2.facet.layoutResult.rowLeafNodes;

packages/s2-core/__tests__/bugs/issue-565-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { getContainer } from 'tests/util/helpers';
99
import { PivotSheet } from '@/sheet-type';
1010
import { copyData } from '@/utils';
1111

12-
const s2options = {
12+
const s2Options = {
1313
width: 800,
1414
height: 600,
1515
hierarchyType: 'tree' as const,
1616
};
1717

1818
describe('Export data in pivot tree mode', () => {
1919
test('should export correct col header in pivot tree mode', () => {
20-
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2options);
20+
const s2 = new PivotSheet(getContainer(), mockDataConfig, s2Options);
2121
s2.render();
2222
const data = copyData(s2, '\t');
2323
const rows = data.split('\n');

0 commit comments

Comments
 (0)