From 77d2bd86068effa8ceeedd47d45e2dc41013b965 Mon Sep 17 00:00:00 2001
From: lijinke666
Date: Thu, 2 Nov 2023 14:58:47 +0800
Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E5=AE=98=E7=BD=91=20?=
=?UTF-8?q?S2=20=E7=89=88=E6=9C=AC=20&=20=E4=BC=98=E5=8C=96=E6=96=87?=
=?UTF-8?q?=E6=A1=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.en-US.md | 8 +--
README.md | 10 ++--
packages/s2-react/playground/index.tsx | 58 ++++++++++++++++++-
.../docs/api/basic-class/spreadsheet.zh.md | 2 +-
s2-site/docs/api/general/S2DataConfig.zh.md | 2 +-
s2-site/docs/common/contact-us.en.md | 3 -
s2-site/docs/common/contact-us.zh.md | 3 -
s2-site/docs/common/development.zh.md | 10 +++-
s2-site/docs/common/packages.zh.md | 15 +++++
s2-site/docs/common/style.zh.md | 2 +-
s2-site/docs/manual/faq.zh.md | 16 ++---
s2-site/docs/manual/getting-started.zh.md | 46 +++++++++------
s2-site/docs/manual/introduction.zh.md | 7 ++-
.../layout/adaptive/demo/react-adaptive.tsx | 12 ++--
.../examples/layout/basic/demo/adaptive.ts | 21 +++++++
.../examples/layout/basic/demo/colAdaptive.ts | 1 +
s2-site/examples/layout/basic/demo/compact.ts | 18 +++++-
s2-site/examples/layout/basic/demo/meta.json | 10 +++-
s2-site/package.json | 14 ++---
s2-site/public/site.css | 4 ++
20 files changed, 193 insertions(+), 69 deletions(-)
create mode 100644 s2-site/examples/layout/basic/demo/adaptive.ts
diff --git a/README.en-US.md b/README.en-US.md
index 166fd4efca..9f4e2fdd37 100644
--- a/README.en-US.md
+++ b/README.en-US.md
@@ -68,8 +68,9 @@ demo components and expansion capabilities, it allows developers to use it quick
## 📦 Installation
```bash
-$ npm install @antv/s2
-# yarn add @antv/s2
+$ npm install @antv/s2 --save
+# yarn add @antv/s2 --save
+# pnpm install @antv/s2 --save
```
## 🔨 Getting Started
@@ -227,9 +228,6 @@ yarn site:start
-
-
-
## 👬 Contributors
diff --git a/README.md b/README.md
index d636c4b73d..341116452c 100644
--- a/README.md
+++ b/README.md
@@ -64,8 +64,9 @@ S2 是 AntV 在多维交叉分析表格领域的解决方案,完全基于数
## 📦 安装
```bash
-$ npm install @antv/s2
-# yarn add @antv/s2
+$ npm install @antv/s2 --save
+# yarn add @antv/s2 --save
+# pnpm install @antv/s2 --save
```
## 🔨 使用
@@ -73,7 +74,7 @@ $ npm install @antv/s2
### 1. 数据准备
- s2DataConfig
+ s2DataConfig
```ts
const s2DataConfig = {
@@ -221,9 +222,6 @@ yarn site:start
-
-
-
## 👬 Contributors
diff --git a/packages/s2-react/playground/index.tsx b/packages/s2-react/playground/index.tsx
index 5d27b80834..08461e21ed 100644
--- a/packages/s2-react/playground/index.tsx
+++ b/packages/s2-react/playground/index.tsx
@@ -324,6 +324,57 @@ function MainLayout() {
);
}, [tableSheetColumnType]);
+ useUpdateEffect(() => {
+ switch (options.style.layoutWidthType) {
+ case 'compact':
+ updateOptions({
+ style: {
+ cellCfg: {
+ width: 200,
+ },
+ },
+ });
+ 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',
+ },
+ ],
+ }),
+ );
+ break;
+
+ default:
+ updateOptions({
+ style: DEFAULT_STYLE,
+ });
+ setDataCfg(pivotSheetDataCfg);
+ }
+ }, [options.style.layoutWidthType]);
+
// ================== Config ========================
const mergedOptions: SheetComponentOptions = customMerge(
@@ -442,7 +493,7 @@ function MainLayout() {
行列等宽
列等宽
@@ -450,7 +501,10 @@ function MainLayout() {
-
+
默认
简约灰
多彩蓝
diff --git a/s2-site/docs/api/basic-class/spreadsheet.zh.md b/s2-site/docs/api/basic-class/spreadsheet.zh.md
index c52e37f00b..37d949e8c1 100644
--- a/s2-site/docs/api/basic-class/spreadsheet.zh.md
+++ b/s2-site/docs/api/basic-class/spreadsheet.zh.md
@@ -58,7 +58,7 @@ s2.isPivotMode()
| updatePagination | 更新分页 | (pagination: [Pagination](/docs/api/general/S2Options#pagination)) => void | |
| getContentHeight | 获取当前表格实际内容高度 | `() => number` | |
| changeSheetSize (别名:changeSize) | 修改表格画布大小,不用重新加载数据 | `(width?: number, height?: number) => void` | |
-| getLayoutWidthType | 获取单元格宽度布局类型(LayoutWidthType: `adaptive(自适应)` \| `colAdaptive(列自适应)` \| `compact(紧凑)`) | () => `LayoutWidthType`| |
+| getLayoutWidthType | 获取单元格宽度布局类型。[详情](/api/general/s2-options#style) | () => `adaptive \| colAdaptive \| compact` | |
| getRowNodes | 获取行头节点 | (level: number) => [Node[]](/docs/api/basic-class/node/) | |
| getRowLeafNodes | 获取行头叶子节点 | () => [Node[]](/docs/api/basic-class/node/) | |
| getColumnNodes | 获取列头节点 | (level: number) => [Node[]](/docs/api/basic-class/node/) | |
diff --git a/s2-site/docs/api/general/S2DataConfig.zh.md b/s2-site/docs/api/general/S2DataConfig.zh.md
index f06b8effbe..55d5bee498 100644
--- a/s2-site/docs/api/general/S2DataConfig.zh.md
+++ b/s2-site/docs/api/general/S2DataConfig.zh.md
@@ -68,7 +68,7 @@ object **必选**,_default:null_
| columns | 列维度列表 | [Columns[]](#columns) | `[]` | |
| values | 指标维度列表 | `string[]` | `[]` | |
| valueInCols | 指标维度是否在列头 | `boolean` | `true` | |
-| customValueOrder | 自定义指标维度在行列头中的层级顺序 (即 `values` 的 顺序,从 `0` 开始) [查看示例](/zh/examples/custom/custom-layout/#custom-value-order) | `number` | - | |
+| customValueOrder | 自定义指标维度在行列头中的层级顺序 (即 `values` 的 顺序,从 `0` 开始,**仅支持单指标**) [查看示例](/zh/examples/custom/custom-layout/#custom-value-order) | `number` | - | |
### Meta
diff --git a/s2-site/docs/common/contact-us.en.md b/s2-site/docs/common/contact-us.en.md
index 192fd5b82e..397c40a4ad 100644
--- a/s2-site/docs/common/contact-us.en.md
+++ b/s2-site/docs/common/contact-us.en.md
@@ -7,7 +7,4 @@ order: 5
-
-
-
diff --git a/s2-site/docs/common/contact-us.zh.md b/s2-site/docs/common/contact-us.zh.md
index 59ae6f1dba..6281d0dc71 100644
--- a/s2-site/docs/common/contact-us.zh.md
+++ b/s2-site/docs/common/contact-us.zh.md
@@ -7,7 +7,4 @@ order: 5
-
-
-
diff --git a/s2-site/docs/common/development.zh.md b/s2-site/docs/common/development.zh.md
index 7e5bee0bc2..88b9a3135d 100644
--- a/s2-site/docs/common/development.zh.md
+++ b/s2-site/docs/common/development.zh.md
@@ -1,4 +1,12 @@
-跃跃欲试想贡献?[查看贡献指南](https://s2.antv.antgroup.com/manual/contribution)
+跃跃欲试想贡献?[查看贡献指南](https://s2.antv.antgroup.com/manual/contribution) , 欢迎 [Pull Request](https://github.com/antvis/S2/pulls),或给我们 [报告 Bug](https://github.com/antvis/S2/issues/new?assignees=&labels=&projects=&template=bug-report.md&title=%F0%9F%90%9B).
+
+> 强烈建议花一点你的宝贵时间阅读:
+
+- [《提 Issue 前必读》](https://github.com/antvis/S2/issues/1904)
+- [《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393)
+- [《如何有效地报告 Bug》](https://www.chiark.greenend.org.uk/~sgtatham/bugs-cn.html)
+- [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)
+- [《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545)
```bash
git clone git@github.com:antvis/S2.git
diff --git a/s2-site/docs/common/packages.zh.md b/s2-site/docs/common/packages.zh.md
index 3b0767f32b..01f71f584a 100644
--- a/s2-site/docs/common/packages.zh.md
+++ b/s2-site/docs/common/packages.zh.md
@@ -3,8 +3,23 @@ title: Packages
order: 5
---
+- `@antv/s2`: 基于 `Canvas` 和 [AntV/G](https://g.antv.vision/zh/docs/guide/introduce) 开发,提供基本的表格展示/交互等能力。
+- `@antv/s2-react`: 基于 `React` 和 `@antv/s2` 封装,提供配套的分析组件,配置项和 `@antv/s2` 通用。
+- `@antv/s2-vue`: 基于 `Vue3` 和 `@antv/s2` 封装,配置项和 `@antv/s2` 通用,如果你想在 `Vue2` 中使用,请使用 `@antv/s2`。
+
+也就是说 `@antv/s2` 和**框架无关**,你也可以在 `Vue`, `Angular` 等框架中直接使用。
+
| 版本号 | 稳定版 | 测试版 | 预览版 | 先行版 | 包大小 | 下载量 |
| -------- | ------ | --------- | ---------- | ---------- | ---------- | ------ |
| [@antv/s2](https://github.com/antvis/S2/tree/master/packages/s2-core) | ![latest](https://img.shields.io/npm/v/@antv/s2/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2.svg) |
| [@antv/s2-react](https://github.com/antvis/S2/tree/master/packages/s2-react) | ![latest](https://img.shields.io/npm/v/@antv/s2-react/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-react/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-react/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-react/next.svg)| ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-react@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-react.svg) |
| [@antv/s2-vue](https://github.com/antvis/S2/tree/master/packages/s2-vue) | ![latest](https://img.shields.io/npm/v/@antv/s2-vue/latest.svg) | ![beta](https://img.shields.io/npm/v/@antv/s2-vue/beta.svg) | ![alpha](https://img.shields.io/npm/v/@antv/s2-vue/alpha.svg) | ![next](https://img.shields.io/npm/v/@antv/s2-vue/next.svg) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-vue@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-vue.svg) |
+
+:::info{title='如何获取新版本发布通知?'}
+
+- 订阅:[https://github.com/antvis/S2/releases.atom](https://github.com/antvis/S2/releases.atom) 来获得新版本发布的通知。
+- 加入钉钉交流群,新版本发布后,会通过🤖 群机器人推送。
+- `Watch` [S2 代码仓库](https://github.com/antvis/S2), 选择 `Custom - Releases` 来获取消息推送。
+
+![preview](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*NKYFSKFV_scAAAAAAAAAAAAADmJ7AQ/original)
+:::
diff --git a/s2-site/docs/common/style.zh.md b/s2-site/docs/common/style.zh.md
index 22f4c3e823..26b81349fd 100644
--- a/s2-site/docs/common/style.zh.md
+++ b/s2-site/docs/common/style.zh.md
@@ -9,7 +9,7 @@ object **必选**,_default:null_ 功能描述:样式设置
| 参数 | 类型 | 必选 | 默认值 | 功能描述 |
| --- | --- | --- | --- | --- |
-| layoutWidthType | `adaptive \| colAdaptive \| compact` | | | 单元格宽度布局类型
`adaptive` : 行列等宽,均分整个 `Canvas` 画布宽度
`colAdaptive`:列等宽,行头紧凑布局,列等分画布宽度减去行头宽度的剩余宽度
`compact`:行列紧凑布局,列头宽度为内容实际宽度 (采样列前 50 个数值), 指标维度少的时候无法布满整个画布 |
+| layoutWidthType | `adaptive \| colAdaptive \| compact` | | | 单元格宽度布局类型
`adaptive` : 行列等宽,均分整个表格 (`Canvas`) 画布宽度
`colAdaptive`:列等宽,行头紧凑布局,列等分画布宽度减去行头宽度的剩余宽度
`compact`:行列紧凑布局,列头宽度为内容实际宽度 (采样列前 50 个数值), 指标维度少的时候无法布满整个画布 |
| showTreeLeafNodeAlignDot | `boolean` | | false | 树状模式下叶子节点是否显示层级占位点 |
| treeRowsWidth | `number` | | 120 | 树状模式行单元格宽度 (优先级大于 `rowCfg.width` 和 `rowCfg.treeRowsWidth (已废弃)`) |
| hierarchyCollapse | `boolean` | | `false` | 在树状结构模式下行头是否默认展开。 |
diff --git a/s2-site/docs/manual/faq.zh.md b/s2-site/docs/manual/faq.zh.md
index 99d67ee8c9..706556faeb 100644
--- a/s2-site/docs/manual/faq.zh.md
+++ b/s2-site/docs/manual/faq.zh.md
@@ -4,7 +4,7 @@ order: 8
---
:::warning{title="一些建议"}
-**在提出问题前,请确保你已经仔细阅读了一遍文档,查看了相关图表示例,并且已经查看了常见问题。**
+**在提出问题前,请确保你已经仔细阅读了一遍文档,查看了相关图表示例,并且已经查看了常见问题和 Issues。**
:::
## 1. 使用问题
@@ -254,17 +254,7 @@ s2.setTheme({
目前只有 React 版本 `@antv/s2-react` 支持编辑表格,其他版本暂不支持,需参考 [源码](https://github.com/antvis/S2/blob/2d85d5739f5a3a52e92df699a935df93aa2a6a73/packages/s2-react/src/components/sheets/editable-sheet/index.tsx#L10) 自行实现
-### S2 有对应的 `Vue` 或者 `Angular` 版本吗?
-
-目前,S2 由三个包构成
-
-- `@antv/s2`: 基于 `canvas` 和 [AntV/G](https://g.antv.vision/zh/docs/guide/introduce) 开发,提供基本的表格展示/交互等能力
-- `@antv/s2-react`: 基于 `@antv/s2` 封装,提供配套的分析组件
-- `@antv/s2-vue`: 基于 `Vue3` 和 `@antv/s2` 封装,提供配套的分析组件
-
-也就是说 `@antv/s2` 和**框架无关**,你可以在 `Vue`, `Angular` 等框架中使用。
-
-以下是版本概览:
+### S2 有对应的 `Vue` 或者 `Angular` 版本吗?如何获取新版本发布通知?
@@ -323,6 +313,8 @@ s2.setTheme({
### 有讨论群吗?
+交流群不提供任何答疑,有任何问题请直接提交 [Issue](https://github.com/antvis/S2/issues/new/choose) 或者 [Discussion](https://github.com/antvis/S2/discussions/new?category=q-a), 当然,也期待你的 [Pull request](https://github.com/antvis/S2/pulls).
+
## 2. 错误和警告
diff --git a/s2-site/docs/manual/getting-started.zh.md b/s2-site/docs/manual/getting-started.zh.md
index 64705d1340..4f23674fd9 100644
--- a/s2-site/docs/manual/getting-started.zh.md
+++ b/s2-site/docs/manual/getting-started.zh.md
@@ -2,26 +2,30 @@
title: 快速上手
order: 1
---
+
## 📦 安装
-### npm | yarn 安装
+### 使用 npm 或 yarn 或 pnpm 安装
```bash
# npm
-$ npm install @antv/s2
+$ npm install @antv/s2 --save
# yarn
-$ yarn add @antv/s2
+$ yarn add @antv/s2 --save
+
+# pnpm
+$ pnpm install @antv/s2 --save
```
### 使用 React 或 Vue3 版本
```bash
# React
-$ yarn add @antv/s2 @antv/s2-react
+$ yarn add @antv/s2 @antv/s2-react --save
# Vue3
-$ yarn add @antv/s2 @antv/s2-vue
+$ yarn add @antv/s2 @antv/s2-vue --save
```
### 浏览器引入(不推荐)
@@ -34,6 +38,8 @@ $ yarn add @antv/s2 @antv/s2-vue
创建 `S2` 表格有三种方式,基础类版本 `(s2-core)` 和 基于 `core` 层 封装的 `React` 和 `Vue3` 版本
+### 版本
+
### 基础类
@@ -184,7 +190,8 @@ s2.render();
### `React` 版本
-`S2` 提供了开箱即用的 `React` 版本 [表格组件](/examples/gallery#category-表格组件), 还有丰富的配套 [分析组件](/examples/gallery#category-Tooltip), 帮助开发者快速满足业务看数分析需求。
+`S2` 提供了开箱即用的 `React` 版本 [表格组件](examples/gallery#category-表格组件)
+, 还有丰富的配套 [分析组件](/examples/gallery#category-Tooltip), 帮助开发者快速满足业务看数分析需求。
#### 表格组件使用
@@ -194,8 +201,6 @@ import ReactDOM from 'react-dom';
import { SheetComponent } from '@antv/s2-react';
import '@antv/s2-react/dist/style.min.css';
-const container = document.getElementById('container');
-
ReactDOM.render(
diff --git a/s2-site/docs/manual/introduction.zh.md b/s2-site/docs/manual/introduction.zh.md
index c577f4e01a..7e0c4361e5 100644
--- a/s2-site/docs/manual/introduction.zh.md
+++ b/s2-site/docs/manual/introduction.zh.md
@@ -27,7 +27,7 @@ redirect_from:
## ❓ 什么是 S2
-[S2](https://github.com/antvis/s2) 是一个面向可视分析领域的数据驱动的表可视化引擎。"S" 取自于 "SpreadSheet" 的两个 "S","2" 代表了透视表中的行列两个维度。旨在提供美观、易用、高性能、易扩展的多维表格。
+[S2](https://github.com/antvis/s2) 是一个面向可视分析领域的数据驱动的表可视化引擎。`S` 取自于 `SpreadSheet` 的两个 `S`,`2` 代表了透视表中的行列两个维度。旨在提供美观、易用、高性能、易扩展的多维表格。
![demos](https://gw.alipayobjects.com/zos/antfincdn/6R5Koawk9L/huaban%2525202.png)
@@ -42,8 +42,9 @@ redirect_from:
## 📦 安装
```bash
-npm install @antv/s2
-# yarn add @antv/s2
+npm install @antv/s2 --save
+# yarn add @antv/s2 --save
+# pnpm install @antv/s2 --save
```
## 🔨 使用
diff --git a/s2-site/examples/layout/adaptive/demo/react-adaptive.tsx b/s2-site/examples/layout/adaptive/demo/react-adaptive.tsx
index f89d279ec9..8133f86da9 100644
--- a/s2-site/examples/layout/adaptive/demo/react-adaptive.tsx
+++ b/s2-site/examples/layout/adaptive/demo/react-adaptive.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { SheetComponent } from '@antv/s2-react';
-import { concat, debounce, forEach, map } from 'lodash';
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json',
@@ -13,13 +12,16 @@ fetch(
height: 480,
};
-
ReactDOM.render(
- document.getElementById('container')
- }} />,
+ getContainer: () => document.getElementById('container'),
+ }}
+ />,
document.getElementById('container'),
);
});
diff --git a/s2-site/examples/layout/basic/demo/adaptive.ts b/s2-site/examples/layout/basic/demo/adaptive.ts
new file mode 100644
index 0000000000..e63fdb9be5
--- /dev/null
+++ b/s2-site/examples/layout/basic/demo/adaptive.ts
@@ -0,0 +1,21 @@
+import { PivotSheet } from '@antv/s2';
+
+fetch(
+ 'https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json',
+)
+ .then((res) => res.json())
+ .then((dataCfg) => {
+ const container = document.getElementById('container');
+
+ const s2Options = {
+ width: 600,
+ height: 480,
+ style: {
+ // 了解更多: https://s2.antv.antgroup.com/api/general/s2-options#style
+ layoutWidthType: 'adaptive',
+ },
+ };
+ const s2 = new PivotSheet(container, dataCfg, s2Options);
+
+ s2.render();
+ });
diff --git a/s2-site/examples/layout/basic/demo/colAdaptive.ts b/s2-site/examples/layout/basic/demo/colAdaptive.ts
index a8c54becc5..6c37ca45da 100644
--- a/s2-site/examples/layout/basic/demo/colAdaptive.ts
+++ b/s2-site/examples/layout/basic/demo/colAdaptive.ts
@@ -11,6 +11,7 @@ fetch(
width: 600,
height: 480,
style: {
+ // 了解更多: https://s2.antv.antgroup.com/api/general/s2-options#style
layoutWidthType: 'colAdaptive',
},
};
diff --git a/s2-site/examples/layout/basic/demo/compact.ts b/s2-site/examples/layout/basic/demo/compact.ts
index bf1b9ce198..408058793c 100644
--- a/s2-site/examples/layout/basic/demo/compact.ts
+++ b/s2-site/examples/layout/basic/demo/compact.ts
@@ -5,16 +5,32 @@ fetch(
)
.then((res) => res.json())
.then((dataCfg) => {
+ // 增加几条长度不一致的 mock 数据
+ dataCfg.data.at(0).number = 11111111;
+ dataCfg.data.at(6).number = 7777;
+ dataCfg.data.at(-1).number = 666666;
+
const container = document.getElementById('container');
const s2Options = {
- width: 400,
+ width: 600,
height: 480,
style: {
+ // 了解更多: https://s2.antv.antgroup.com/api/general/s2-options#style
layoutWidthType: 'compact',
},
};
+
const s2 = new PivotSheet(container, dataCfg, s2Options);
+ // 紧凑模式下, 列头宽度为实际内容宽度 (取当前列最大值, 采样每一列前 50 条数据)
+ s2.setTheme({
+ dataCell: {
+ text: {
+ fontSize: 16,
+ },
+ },
+ });
+
s2.render();
});
diff --git a/s2-site/examples/layout/basic/demo/meta.json b/s2-site/examples/layout/basic/demo/meta.json
index be75879383..7ac8996af1 100644
--- a/s2-site/examples/layout/basic/demo/meta.json
+++ b/s2-site/examples/layout/basic/demo/meta.json
@@ -4,13 +4,21 @@
"en": "Pivot"
},
"demos": [
+ {
+ "filename": "adaptive.ts",
+ "title": {
+ "zh": "行列等宽布局 (默认)",
+ "en": "Adaptive (Default)"
+ },
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/cEkDC%26g%24xj/df31b66d-4a76-4e69-be5a-f467af2d337d.png"
+ },
{
"filename": "compact.ts",
"title": {
"zh": "紧凑布局",
"en": "Compact"
},
- "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/yzBFZaMMLH/55a2d580-1121-468e-9d0b-25f3e9ae25df.png"
+ "screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*NN_lTpAqhQkAAAAAAAAAAAAADmJ7AQ/original"
},
{
"filename": "colAdaptive.ts",
diff --git a/s2-site/package.json b/s2-site/package.json
index 0bde635b0f..0d5394b618 100644
--- a/s2-site/package.json
+++ b/s2-site/package.json
@@ -28,14 +28,14 @@
"sync:s2-lock": "yarn upgrade @antv/s2 @antv/s2-react --latest"
},
"dependencies": {
- "@ant-design/icons": "^4.7.0",
- "@antv/dumi-theme-antv": "^0.3.5",
+ "@ant-design/icons": "^4.8.1",
+ "@antv/dumi-theme-antv": "^0.3.20",
"@antv/g-canvas": "^0.5.12",
- "@antv/s2": "^1.42.0",
- "@antv/s2-react": "^1.37.0",
- "antd": "^4.24.1",
- "copy-to-clipboard": "^3.3.1",
- "dumi": "^2.0.3",
+ "@antv/s2": "^1.51.2",
+ "@antv/s2-react": "^1.44.1",
+ "antd": "^4.24.14",
+ "copy-to-clipboard": "^3.3.3",
+ "dumi": "^2.2.14",
"gh-pages": "^3.1.0",
"lodash": "^4.17.21",
"react-color": "^2.19.3"
diff --git a/s2-site/public/site.css b/s2-site/public/site.css
index 9c282610b2..bbe2cc2b58 100644
--- a/s2-site/public/site.css
+++ b/s2-site/public/site.css
@@ -18,6 +18,10 @@
margin: 20px 0;
}
+.dumi-default-table {
+ margin: 0;
+}
+
img[alt='preview'] {
margin: 10px 0;
}