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