Skip to content
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
17 changes: 17 additions & 0 deletions content/en-US/guides/sheets/getting-started/cell-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ The complete style field is as follows.
| ht | Horizontal alignment |
| vt | Vertical alignment |
| tb | Truncate overflow |
| pd | Padding |
| n | Number format |

You can check out the type information of each field of [IStyleData](https://reference.univer.ai/en-US/interfaces/IStyleData).
Expand Down Expand Up @@ -351,6 +352,22 @@ You can check out the type information of each field of [IStyleData](https://ref
}
```

#### Padding

`pd` is an object, represents padding.

```typescript
// IStyleData
{
pd: {
t: 0, // Top padding
b: 0, // Bottom paddingAdd commentMore actions
l: 0, // Left padding
r: 0 // Right padding
}
}
```

#### Number Format [#number-format]

`n` is an object, The `pattern` field indicates the number format. The number format is a string, please refer to [here](https://support.microsoft.com/en-us/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68)。
Expand Down
17 changes: 17 additions & 0 deletions content/zh-CN/guides/sheets/getting-started/cell-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ cellData 的结构如下
| ht | 水平对齐方式 |
| vt | 垂直对齐方式 |
| tb | 截断溢出 |
| pd | 内边距 |
| n | 数字格式 |

详细了解 [IStyleData](https://reference.univer.ai/zh-CN/interfaces/IStyleData) 每个字段的类型信息。
Expand Down Expand Up @@ -351,6 +352,22 @@ cellData 的结构如下
}
```

#### 内边距

`pd` 是一个对象,表示内边距。

```typescript
// IStyleData
{
pd: {Add commentMore actions
t: 0, // 上边距
b: 0, // 下边距
l: 0, // 左边距
r: 0 // 右边距
}
}
```

#### 数字格式 [#number-format]

`n` 是一个对象,其 `pattern` 字段表示数字格式。数字格式是一个字符串,具体请参考 [这里](https://support.microsoft.com/zh-cn/office/%E6%95%B0%E5%AD%97%E6%A0%BC%E5%BC%8F%E4%BB%A3%E7%A0%81-5026bbd6-04bc-48cd-bf33-80f18b4eae68)。
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@univerjs-site/docs",
"type": "module",
"version": "0.8.1",
"version": "0.8.2",
"private": true,
"packageManager": "pnpm@10.12.1",
"scripts": {
Expand All @@ -18,12 +18,12 @@
"@feelback/react": "^0.3.4",
"@lit/react": "^1.0.7",
"@univerjs/icons": "^0.4.4",
"@univerjs/presets": "0.8.1",
"@univerjs/sheets-crosshair-highlight": "0.8.1",
"@univerjs/sheets-formula-ui": "0.8.1",
"@univerjs/themes": "0.8.1",
"@univerjs/uniscript": "0.8.1",
"@univerjs/watermark": "0.8.1",
"@univerjs/presets": "0.8.2",
"@univerjs/sheets-crosshair-highlight": "0.8.2",
"@univerjs/sheets-formula-ui": "0.8.2",
"@univerjs/themes": "0.8.2",
"@univerjs/uniscript": "0.8.2",
"@univerjs/watermark": "0.8.2",
"clsx": "^2.1.1",
"lit": "^3.3.0",
"next": "15.3.3",
Expand Down
Loading
Loading