fix: icons
This commit is contained in:
@@ -74,7 +74,7 @@ export interface DeckActions {
|
||||
setPadding: (padding: number) => void;
|
||||
|
||||
// 数据设置
|
||||
setCards: (cards: CardData[]) => void;
|
||||
setCards: (cards: CSV<CardData>) => void;
|
||||
setActiveTab: (index: number) => void;
|
||||
updateCardData: (index: number, key: string, value: string) => void;
|
||||
|
||||
@@ -139,7 +139,7 @@ export function createDeckStore(
|
||||
src: initialSrc,
|
||||
rawSrc: initialSrc,
|
||||
dimensions: null,
|
||||
cards: [],
|
||||
cards: [] as any,
|
||||
activeTab: 0,
|
||||
layerConfigs: [],
|
||||
isEditing: false,
|
||||
@@ -195,7 +195,7 @@ export function createDeckStore(
|
||||
updateDimensions();
|
||||
};
|
||||
|
||||
const setCards = (cards: CardData[]) => setState({ cards, activeTab: 0 });
|
||||
const setCards = (cards: CSV<CardData>) => setState({ cards, activeTab: 0 });
|
||||
const setActiveTab = (index: number) => setState({ activeTab: index });
|
||||
const updateCardData = (index: number, key: string, value: string) => {
|
||||
setState('cards', index, key, value);
|
||||
@@ -271,20 +271,20 @@ export function createDeckStore(
|
||||
const layersStr = formatLayers(state.layerConfigs);
|
||||
const parts = [
|
||||
`:md-deck[${state.rawSrc || state.src}]`,
|
||||
`{size="${state.sizeW}x${state.sizeH}"`,
|
||||
`grid="${state.gridW}x${state.gridH}"`
|
||||
`{size="${state.sizeW}x${state.sizeH} "`,
|
||||
`grid="${state.gridW}x${state.gridH} "`
|
||||
];
|
||||
|
||||
// 仅在非默认值时添加 bleed 和 padding
|
||||
if (state.bleed !== DECK_DEFAULTS.BLEED) {
|
||||
parts.push(`bleed="${state.bleed}"`);
|
||||
parts.push(`bleed="${state.bleed} "`);
|
||||
}
|
||||
if (state.padding !== DECK_DEFAULTS.PADDING) {
|
||||
parts.push(`padding="${state.padding}"`);
|
||||
parts.push(`padding="${state.padding} "`);
|
||||
}
|
||||
|
||||
parts.push(`layers="${layersStr}"}`);
|
||||
return parts.join(' ');
|
||||
return parts.join('');
|
||||
};
|
||||
|
||||
const copyCode = async () => {
|
||||
|
||||
Reference in New Issue
Block a user