Skip to content

Commit 7466721

Browse files
committed
chore: 滴滴 1.5 补充文档历史、版本、移动端文档
1 parent 9db4dda commit 7466721

File tree

6 files changed

+36
-1
lines changed

6 files changed

+36
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<li><a href="/document/gallery.md/">相册</a></li>
2828
<li><a href="/document/demoscreen.md/">演示模式</a></li>
2929
<li><a href="/document/shortcut.md/">快捷键</a></li>
30+
<li><a href="/document/mobile.md/">移动端</a></li>
3031
</ul>
3132
</li>
3233
<!-- 表格 -->

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [mention](document/mention.md)
2121
* [上传](document/uploader.md)
2222
* [快捷键](document/shortcut.md)
23+
* [移动端](document/mobile.md)
2324

2425
---
2526

document/history.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const history = new History({
2828

2929
|名称|类型|默认值|描述|
3030
| -- | -- | -- | -- |
31+
| `snapshot` | `string` | 可选 | 获取某条历史快照内容的接口 |
32+
| `steps` | `string` | 可选 | 按范围获取逐条历史更新内容的接口 |
3133
| `fetch` | `string` | 可选 | 获取历史列表的接口 |
3234
| `revert` | `string` | 可选 | 还原某一历史接口 |
3335
| `user` | `string` | 可选 | 根据id列表获取用户详细信息接口 |

document/mobile.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# 文档移动端插件
2+
3+
加载此插件可以使文档适配移动端网页。
4+
5+
## 构造函数
6+
7+
- 用法
8+
9+
```js
10+
const Editor = shimo.sdk.document.Editor
11+
const Mobile = shimo.sdk.document.plugins.Mobile
12+
const editor = new Editor()
13+
const mobile = new Mobile({
14+
...options,
15+
})
16+
```
17+
18+
- 参数
19+
20+
| 名称 | 类型 | 默认值 | 描述 |
21+
| ------------- | ------------- | --------------- | -------------- |
22+
| `editor` | `Editor` | 必选 | 编辑器实例 |
23+
| `container` | `HTMLElement` | `document.body` | 文档容器 |
24+
| `editorWrap` | `HTMLElement` | 必选 | 编辑器容器 |
25+
| `commentable` | `boolean` | `false` | 是否可评论 |
26+
| `comment` | `Comment` | 可选 | 评论插件实例 |
27+
| `upload` | `boolean` | `false` | 是否支持上传 |
28+
| `discord` | `Discord` | 可选 | 讨论插件实例 |
29+
| `toolbar` | `boolean` | `false` | 是否启用工具栏 |

document/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
<li><a href="/document/mention.md/">mention</a></li>
1616
<li><a href="/document/uploader.md/">上传</a></li>
1717
<li><a href="/document/shortcut.md/">快捷键</a></li>
18+
<li><a href="/document/mobile.md/">移动端</a></li>
1819
</ul>

document/revision.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const revision = new Revision({
3232
| `length` | `string` | 可选 | 获取版本列表长度接口 |
3333
| `fetch` | `string` | 可选 | 获取版本列表接口 |
3434
| `fetchTitle` | `string` | 可选 | 获取版本标题接口 |
35+
| `fetchSnapshot` | `string` | 可选 | 获取某版本快照内容接口 |
3536
| `fetchContent` | `string` | 可选 | 获取版本内容接口 |
3637
| `generate` | `string` | 可选 | 保存版本接口 |
3738
| `revert` | `string` | 可选 | 恢复到版本接口 |
@@ -118,4 +119,4 @@ revision.on(Revision.events.ENTER, () => {})
118119
revision.on(Revision.events.QUIT, () => {})
119120
// 版本还原成功
120121
revision.on(Revision.events.REVERT, () => {})
121-
```
122+
```

0 commit comments

Comments
 (0)