Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 修复 v1 官网部分页面白屏 #2842

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions s2-site/.dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ export default defineConfig({
styles: ['/site.css'],
links: [],
scripts: [],
monorepoRedirect: {
peerDeps: true,
srcDir: ['src', 'esm', 'lib'],
},
// monorepoRedirect: {
// peerDeps: true,
// srcDir: ['src', 'esm', 'lib'],
// },
});
16 changes: 8 additions & 8 deletions s2-site/docs/api/basic-class/base-cell.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ Function description: cell base class. [details](https://github.com/antvis/S2/bl

| parameter | illustrate | type |
| ---------------------- | -------------------------------------- | ----------------------------------------------------------------------- |
| getMeta | Get cell metadata | () => [ViewMeta](#viewmeta) |
| setMeta | Set cell metadata | (vieMeta: [Partial<ViewMeta>](#viewmeta) ) => void |
| getIconStyle | Get cell icon style | () => [IconTheme](/docs/api/general/S2Theme#icontheme) |
| getStyle | get cell style | () => [DefaultCellTheme](/docs/api/general/S2Theme#defaultcelltheme) |
| getTextAndIconPosition | Get the position of cell text and icon | (iconCount: `number` ) => [TextAndIconPosition](#textandiconposition) |
| getMeta | Get cell metadata | () => [`ViewMeta`](#viewmeta) |
| setMeta | Set cell metadata | (vieMeta: [`Partial<ViewMeta>`](#viewmeta) ) => void |
| getIconStyle | Get cell icon style | () => [`IconTheme`](/docs/api/general/S2Theme#icontheme) |
| getStyle | get cell style | () => [`DefaultCellTheme`](/docs/api/general/S2Theme#defaultcelltheme) |
| getTextAndIconPosition | Get the position of cell text and icon | (iconCount: `number` ) => [`TextAndIconPosition`](#textandiconposition) |
| getActualText | get the drawn text | `() => string` |
| cellType | cell type | [CellTypes](#celltypes) |
| cellType | cell type | [`CellTypes`](#celltypes) |
| initCell | Initialize cells | `() => void` |
| update | update cell | `() => void` |
| getTextStyle | get text style | `() => void` |
| getFormattedFieldValue | Get the formatted field value | `() => { formattedValue: string, value: string }` |
| getMaxTextWidth | Get the maximum width of the text | `() => number` |
| getTextPosition | get text coordinates | [point](#point) |
| getTextPosition | get text coordinates | [`Point`](#point) |
| getContentArea | get content area | `() => { x: number, y: number, width: number, height: number }` |
| updateByState | Update cell styles based on state | `(stateName: InteractionStateName, cell: S2CellType) => void` |
| hideInteractionShape | Interactive layers for hidden cells | `() => void` |
Expand Down Expand Up @@ -65,7 +65,7 @@ export enum CellTypes {

### S2CellType

```ts
```ts | pure
import type { SimpleBBox } from '@antv/g-canvas';

export type S2CellType<T extends SimpleBBox = ViewMeta> =
Expand Down
16 changes: 8 additions & 8 deletions s2-site/docs/api/basic-class/base-cell.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ cell.getActualText()

| 参数 | 说明 | 类型 |
| --- | --- | --- |
| getMeta | 获取单元格元数据 | () => [ViewMeta](#viewmeta) |
| setMeta | 设置单元格元数据 | (vieMeta: [Partial<ViewMeta>](#viewmeta)) => void |
| getIconStyle | 获取单元格图标样式 | () => [IconTheme](/docs/api/general/S2Theme#icontheme) |
| getStyle | 获取单元格样式 | () => [DefaultCellTheme](/docs/api/general/S2Theme#defaultcelltheme) |
| getTextAndIconPosition | 获取单元格文本和图标的位置 | (iconCount: `number`) => [TextAndIconPosition](#textandiconposition) |
| getMeta | 获取单元格元数据 | () => [`ViewMeta`](#viewmeta) |
| setMeta | 设置单元格元数据 | (vieMeta: [`Partial<ViewMeta>`](#viewmeta)) => void |
| getIconStyle | 获取单元格图标样式 | () => [`IconTheme`](/docs/api/general/S2Theme#icontheme) |
| getStyle | 获取单元格样式 | () => [`DefaultCellTheme`](/docs/api/general/S2Theme#defaultcelltheme) |
| getTextAndIconPosition | 获取单元格文本和图标的位置 | (iconCount: `number`) => [`TextAndIconPosition`](#textandiconposition) |
| getActualText | 获取绘制的文本 | `() => string` |
| cellType | 单元格类型 | [CellTypes](#celltypes) |
| cellType | 单元格类型 | [`CellTypes`](#celltypes) |
| initCell | 初始化单元格 | `() => void` |
| update | 更新单元格 | `() => void` |
| getTextStyle | 获取文本样式 | `() => void` |
| getFormattedFieldValue | 获取格式化后的字段值 | `() => { formattedValue: string, value: string }` |
| getMaxTextWidth | 获取文本最大宽度 | `() => number` |
| getTextPosition | 获取文本坐标 | [Point](#point) |
| getTextPosition | 获取文本坐标 | [`Point`](#point) |
| getContentArea | 获取内容区域 | `() => { x: number, y: number, width: number, height: number }` |
| updateByState | 根据状态更新单元格样式 | `(stateName: InteractionStateName, cell: S2CellType) => void` |
| hideInteractionShape | 隐藏单元格的交互图层 | `() => void` |
Expand Down Expand Up @@ -70,7 +70,7 @@ export enum CellTypes {

### S2CellType

```ts
```ts | pure
import type { SimpleBBox } from '@antv/g-canvas';

export type S2CellType<T extends SimpleBBox = ViewMeta> =
Expand Down
2 changes: 1 addition & 1 deletion s2-site/docs/api/basic-class/base-data-set.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ s2.dataSet.xx()
| getCellData | Get a single cell data | (params: [CellDataParams](#celldataparams) ) => [DataType\[\]](#datatype) | |
| getMultiData | Get bulk cell data | (query: [DataType](#datatype),params?: [MultiDataParams](#multidataparams)) => [DataType[]](#datatype) | |
| <strike>getMultiData</strike>(deprecated) | Get bulk cell data | (query: [DataType](#datatype) , isTotals?: boolean, isRow?: boolean, drillDownFields?: string\[], includeTotalData:boolean) => [DataType\[\]](#datatype) | |
| moreThanOneValue | Is there more than 1 value | () => [ViewMeta](#viewmeta) | |
| moreThanOneValue | Is there more than 1 value | () => [`ViewMeta`](#viewmeta) | |

### DataType

Expand Down
2 changes: 1 addition & 1 deletion s2-site/docs/api/basic-class/base-data-set.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ s2.dataSet.getFieldName('type')
| getCellData | 获取单个的单元格数据 | (params: [CellDataParams](#celldataparams)) => [DataType[]](#datatype) | |
| getMultiData | 获取批量的单元格数据 | (query: [DataType](#datatype),params?: [MultiDataParams](#multidataparams)) => [DataType[]](#datatype) | |
| <strike>getMultiData<strike> (已废弃) | 获取批量的单元格数据 | (query: [DataType](#datatype), isTotals?: boolean, isRow?: boolean, drillDownFields?: string[], includeTotalData:boolean) => [DataType[]](#datatype) | |
| moreThanOneValue | 是否超过 1 个数值 | () => [ViewMeta](#viewmeta) | |
| moreThanOneValue | 是否超过 1 个数值 | () => [`ViewMeta`](#viewmeta) | |
| isEmpty | 是否为空数据集 | () => `boolean` | `@antv/s2-v1.51.1` |
| displayFormattedValueMap | 单元格所对应格式化后的值(用于编辑表) | `Map<string, string>` | `@antv/s2-v1.54.5` |

Expand Down
4 changes: 2 additions & 2 deletions s2-site/docs/api/basic-class/interaction.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ enum InterceptType {

### S2CellType

```ts
```ts | pure
type S2CellType<T extends SimpleBBox = ViewMeta> =
| DataCell
| HeaderCell
Expand All @@ -104,7 +104,7 @@ type S2CellType<T extends SimpleBBox = ViewMeta> =

### SelectHeaderCellInfo

```ts
```ts | pure
interface SelectHeaderCellInfo {
cell: S2CellType<ViewMeta>; // 目标单元格
isMultiSelection?: boolean; // 是否是多选
Expand Down
4 changes: 2 additions & 2 deletions s2-site/docs/api/basic-class/interaction.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ enum InterceptType {

### S2CellType

```ts
```ts | pure
type S2CellType<T extends SimpleBBox = ViewMeta> =
| DataCell
| HeaderCell
Expand All @@ -106,7 +106,7 @@ type S2CellType<T extends SimpleBBox = ViewMeta> =

### SelectHeaderCellInfo

```ts
```ts | pure
interface SelectHeaderCellInfo {
cell: S2CellType<ViewMeta>; // 目标单元格
isMultiSelection?: boolean; // 是否是多选
Expand Down
Loading
Loading