新增: 导出 JSON + 导入 JSON + 打印/PDF 导出(P4)
- 工具栏新增三个按钮: 导出 JSON / 导入 JSON / 打印 PDF - 导出 JSON: Blob 下载 store.exportJSON() - 导入 JSON: 文件选择 + FileReader → store.importJSON() - 打印 PDF: window.print() + @media print CSS,逐页 page-break - 打印时隐藏编辑器/HUD/工具栏,只保留幻灯片内容 - 零新依赖(PDF 走浏览器原生打印)
This commit is contained in:
@@ -13,6 +13,9 @@ const emit = defineEmits<{
|
||||
(e: 'open-ai'): void
|
||||
(e: 'save'): void
|
||||
(e: 'open-templates'): void
|
||||
(e: 'export-json'): void
|
||||
(e: 'import-json'): void
|
||||
(e: 'export-pdf'): void
|
||||
}>()
|
||||
|
||||
const themeKeys = Object.keys(themes)
|
||||
@@ -70,6 +73,9 @@ defineProps<{ disabledActions?: string[] }>()
|
||||
<span class="sep"></span>
|
||||
<button class="btn" data-action="library" title="我的演示文库" @click="action('library')">📁 文库</button>
|
||||
<button class="btn" data-action="save" title="保存到文库" :disabled="disabledActions?.includes('save')" @click="action('save')">💾 保存</button>
|
||||
<button class="btn" data-action="export-json" title="导出 JSON" @click="emit('export-json')">📤 导出</button>
|
||||
<button class="btn" data-action="import-json" title="导入 JSON" @click="emit('import-json')">📥 导入</button>
|
||||
<button class="btn" data-action="export-pdf" title="打印/导出 PDF" @click="emit('export-pdf')">🖨 PDF</button>
|
||||
<button class="btn" data-action="open-ai" title="打开 AI 助手" @click="action('open-ai')">🤖 AI</button>
|
||||
<button class="btn" data-action="reset" title="重置为内置示例" :disabled="disabledActions?.includes('reset')" @click="action('reset')">⟲ 重置</button>
|
||||
<button class="btn primary" data-action="present" title="开始演示 (F5)" :disabled="disabledActions?.includes('present')" @click="action('present')">▶ 演示</button>
|
||||
|
||||
Reference in New Issue
Block a user