- Docusaurus 3.7.0 with both English and Chinese (zh-CN) locales - Full API reference split into structured pages - Homepage with hero, feature cards, and quick start section - GitHub Actions workflow for auto-deployment to GitHub Pages Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
346 B
Markdown
19 lines
346 B
Markdown
---
|
|
id: draft-recovery
|
|
title: 草稿恢复
|
|
---
|
|
|
|
# 💾 草稿恢复
|
|
|
|
```tsx
|
|
const draft = JSON.parse(mmkv.getString('paint_draft'));
|
|
|
|
<MaskSegmentCanvas
|
|
originUrl={draft.originUrl}
|
|
maskUrl={draft.maskUrl}
|
|
initialSession={draft}
|
|
/>
|
|
```
|
|
|
|
使用 `ref.session()` 导出当前会话并存储在 MMKV 或 AsyncStorage 中,以便后续恢复。
|