feat: md-deck print
This commit is contained in:
@@ -4,6 +4,7 @@ import { resolvePath } from '../utils/path';
|
||||
import { createDeckStore } from './hooks/deckStore';
|
||||
import { DeckHeader } from './DeckHeader';
|
||||
import { DeckContent } from './DeckContent';
|
||||
import { PrintPreview } from './PrintPreview';
|
||||
import {DataEditorPanel, LayerEditorPanel, PropertiesEditorPanel} from './editor-panel';
|
||||
|
||||
interface DeckProps {
|
||||
@@ -102,6 +103,15 @@ customElement<DeckProps>('md-deck', {
|
||||
|
||||
return (
|
||||
<div class="md-deck mb-4">
|
||||
{/* 打印预览弹窗 */}
|
||||
<Show when={store.state.isPrinting}>
|
||||
<PrintPreview
|
||||
store={store}
|
||||
onClose={() => store.actions.setPrinting(false)}
|
||||
onPrint={() => window.print()}
|
||||
/>
|
||||
</Show>
|
||||
|
||||
{/* Tab 选择器和编辑按钮 */}
|
||||
<Show when={store.state.cards.length > 0 && !store.state.error}>
|
||||
<DeckHeader store={store} />
|
||||
|
||||
Reference in New Issue
Block a user