Skip to content

Commit

Permalink
docs: 修复小计总计错误文档 (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 authored Apr 15, 2024
1 parent 27decee commit a09d1fe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions s2-site/docs/common/totals.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ order: 3
| subTotalsDimensions | 小计的汇总维度 | `string[]` | `[]` | |
| reverseGrandTotalsLayout | 总计布局位置,默认下或右 | `boolean` | `false` | |
| reverseSubTotalsLayout | 小计布局位置,默认下或右 | `boolean` | `false` | |
| label | 总计别名 | `string` | | |
| subLabel | 小计别名 | `string` | | |
| grandTotalsLabel | 总计别名 | `string` | `总计` | |
| subTotalsLabel | 小计别名 | `string` | `小计` | |
| calcGrandTotals | 自定义计算总计 | [CalcTotals](#calctotals) | | |
| calcSubTotals | 自定义计算小计 | [CalcTotals](#calctotals) | | |
| totalsGroupDimensions | 总计的分组维度 |`string[]` | | |
Expand Down
4 changes: 2 additions & 2 deletions s2-site/docs/manual/basic/totals.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ order: 5
| subTotalsDimensions | 小计的汇总维度 | `string[]` | [] ||
| reverseGrandTotalsLayout | 总计布局位置,默认下或右 | `boolean` | false ||
| reverseSubTotalsLayout | 小计布局位置,默认下或右 | `boolean` | false ||
| label | 总计别名 | `string` | | |
| subLabel | 小计别名 | `string` | | |
| grandTotalsLabel | 总计别名 | `string` | `总计` | |
| subTotalsLabel | 小计别名 | `string` | `小计` | |
| calcGrandTotals | 计算总计 | `CalcTotals` | | |
| calcSubTotals | 计算小计 | `CalcTotals` | | |

Expand Down
4 changes: 3 additions & 1 deletion s2-site/docs/manual/migration-v2.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,14 @@ const s2Options = {
- calcTotals: {}.
- reverseLayout: true,
- label: '总计'
- subLabel: '小计'
- totalsGroupDimensions: [],
- reverseSubLayout: true,

+ calcGrandTotals: {}.
+ reverseGrandTotalsLayout: true,
+ grandTotalsLabel: '总计'
+ grandTotalsLabel: '总计',
+ subTotalsLabel: '小计',
+ grandTotalsGroupDimensions: [],
+ reverseSubTotalsLayout: true
};
Expand Down
4 changes: 4 additions & 0 deletions s2-site/examples/analysis/totals/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@ fetch(
reverseGrandTotalsLayout: true,
reverseSubTotalsLayout: true,
subTotalsDimensions: ['province'],
// grandTotalsLabel: '总计',
// subTotalsLabel: '小计',
},
col: {
showGrandTotals: true,
showSubTotals: true,
reverseGrandTotalsLayout: true,
reverseSubTotalsLayout: true,
subTotalsDimensions: ['type'],
// grandTotalsLabel: '总计',
// subTotalsLabel: '小计',
},
},
};
Expand Down

0 comments on commit a09d1fe

Please sign in to comment.