Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into feat-without-antd
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Nov 14, 2024
2 parents e371e16 + 9007e8e commit 59a6348
Show file tree
Hide file tree
Showing 77 changed files with 1,594 additions and 1,695 deletions.
11 changes: 11 additions & 0 deletions packages/s2-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# [@antv/s2-v2.0.0-next.32](https://github.com/antvis/S2/compare/@antv/s2-v2.0.0-next.31...@antv/s2-v2.0.0-next.32) (2024-11-08)


### Bug Fixes

* 修复分割线在深色背景下颜色渲染异常 & 内容宽高未包含分割线的问题 ([#2961](https://github.com/antvis/S2/issues/2961)) ([e759891](https://github.com/antvis/S2/commit/e759891865eee0940d0f5c92345d5490e10eb57c))
* 修复开启自定义指标层级后, 角头数值文本未对齐 close [#2957](https://github.com/antvis/S2/issues/2957) ([#2966](https://github.com/antvis/S2/issues/2966)) ([6558a0d](https://github.com/antvis/S2/commit/6558a0df55dc324e1810e2f2a5d314de7389e2b1))
* 修复文本设为左对齐时, 角头文本没有垂直对齐的问题 ([#2960](https://github.com/antvis/S2/issues/2960)) ([af8c968](https://github.com/antvis/S2/commit/af8c96809fd0e52f1da81e2a1c082a5f5b0b122a))
* 修复明细表自定义列头时开启文本换行, 单元格高度错误的问题 close [#2955](https://github.com/antvis/S2/issues/2955) ([#2968](https://github.com/antvis/S2/issues/2968)) ([ca1f7e8](https://github.com/antvis/S2/commit/ca1f7e8a614dc5b36a6bc270df4ea8338e670444))
* 修复表格卸载后, 高清适配逻辑还会触发的问题 ([#2965](https://github.com/antvis/S2/issues/2965)) ([c837efe](https://github.com/antvis/S2/commit/c837efe29f2ff02ea8957bcaf62be57d2467f160)), closes [L#116](https://github.com/L/issues/116)

# [@antv/s2-v2.0.0-next.31](https://github.com/antvis/S2/compare/@antv/s2-v2.0.0-next.30...@antv/s2-v2.0.0-next.31) (2024-11-01)


Expand Down
53 changes: 53 additions & 0 deletions packages/s2-core/__tests__/bugs/issue-2957-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* @description spec for issue #2957
* https://github.com/antvis/S2/issues/2957
*/
import { PivotSheet } from '@/sheet-type';
import type { S2Options } from '../../src';
import { getContainer } from '../util/helpers';

const s2Options: S2Options = {
width: 800,
height: 600,
};

describe('Corner Measure Text Tests', () => {
test('should get correctly theme config with customValueOrder', async () => {
const s2 = new PivotSheet(
getContainer(),
{
data: [
{
'4rweiwt7aneo': '上海市',
'4w8pyhsbkkjk': '①正常库存',
'4vynudxz28sg': '457',
styleKey: 1,
},
],
fields: {
valueInCols: true,
rows: ['4rweiwt7aneo'],
columns: ['4w8pyhsbkkjk'],
values: ['4vynudxz28sg'],
customValueOrder: 0,
},
},
s2Options,
);

s2.setTheme({
cornerCell: {
measureText: {
fill: 'blue',
textAlign: 'center',
fontSize: 12,
},
},
});
await s2.render();

const extraFieldText = s2.facet.getCornerCells()[1].getTextShape();

expect(extraFieldText.parsedStyle.textBaseline).toEqual('middle');
});
});
23 changes: 23 additions & 0 deletions packages/s2-core/__tests__/data/custom-table-col-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ export const customColSimpleColumns: CustomTreeNode[] = [
},
];

export const customColSimpleMultipleTextColumns: CustomTreeNode[] = [
{
field: 'area',
title: '地区'.repeat(50),
children: [
{ field: 'province', title: '省份' },
{ field: 'city', title: '城市' },
],
},
{
field: 'type',
title: '类型',
},
{
field: 'money',
title: '金额'.repeat(20),
children: [
{ field: 'price', title: '价格', description: '价格描述' },
{ field: 'number', title: '数量'.repeat(30) },
],
},
];

export const customColMultipleColumns: CustomTreeNode[] = [
{
field: 'a-1',
Expand Down
4 changes: 2 additions & 2 deletions packages/s2-core/__tests__/data/data-issue-2385.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"province": "浙江",
"city": "杭州",
"type": "纸张",
"price": "2",
"price": "哈哈哈",
"cost": "1.5"
},
{
Expand Down Expand Up @@ -153,7 +153,7 @@
"type": "圆规",
"province": "吉林",
"city": "白山",
"price": "111",
"price": "aa",
"cost": "1.5"
}
],
Expand Down
Loading

0 comments on commit 59a6348

Please sign in to comment.