feat: card back support?
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user