fix: md-bg articlePath passing
This commit is contained in:
parent
385bcb16d8
commit
2aaca2c56f
|
|
@ -11,6 +11,7 @@ import { CardLayer } from './CardLayer';
|
|||
import { PltPreview } from './PltPreview';
|
||||
|
||||
export interface PrintPreviewProps {
|
||||
articlePath?: string,
|
||||
store: DeckStore;
|
||||
onClose: () => void;
|
||||
onExport: () => void;
|
||||
|
|
@ -169,7 +170,7 @@ export function PrintPreview(props: PrintPreviewProps) {
|
|||
clip-path={shapeClipPath ? `url(#${clipPathId})` : undefined}
|
||||
>
|
||||
<div class="w-full h-full bg-white" {...({ xmlns: 'http://www.w3.org/1999/xhtml' } as any)}>
|
||||
<div
|
||||
<article data-src={props.articlePath}
|
||||
class="absolute"
|
||||
style={{
|
||||
position: 'absolute',
|
||||
|
|
@ -184,7 +185,7 @@ export function PrintPreview(props: PrintPreviewProps) {
|
|||
cardData={card.data}
|
||||
side={card.side || 'front'}
|
||||
/>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</foreignObject>
|
||||
</g>
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ customElement<DeckProps>('md-deck', {
|
|||
{/* 导出 PDF 预览弹窗 */}
|
||||
<Show when={store.state.isExporting}>
|
||||
<PrintPreview
|
||||
articlePath={articlePath}
|
||||
store={store}
|
||||
onClose={() => store.actions.setExporting(false)}
|
||||
onExport={() => {}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue