feat: card back support?

This commit is contained in:
2026-03-13 17:26:00 +08:00
parent 748f57dd55
commit b3dc768786
12 changed files with 430 additions and 222 deletions
+8 -1
View File
@@ -17,6 +17,7 @@ interface DeckProps {
bleed?: number | string;
padding?: number | string;
layers?: string;
backLayers?: string;
fixed?: boolean | string;
}
@@ -30,6 +31,7 @@ customElement<DeckProps>('md-deck', {
bleed: 1,
padding: 2,
layers: '',
backLayers: '',
fixed: false
}, (props, { element }) => {
noShadowDOM();
@@ -86,7 +88,12 @@ customElement<DeckProps>('md-deck', {
}
// 加载 CSV 数据
store.actions.loadCardsFromPath(resolvedSrc, csvPath, (props.layers as string) || '');
store.actions.loadCardsFromPath(
resolvedSrc,
csvPath,
(props.layers as string) || '',
(props.backLayers as string) || ''
);
// 清理函数
onCleanup(() => {