feat: md icon prefix
This commit is contained in:
@@ -269,7 +269,22 @@ export function createDeckStore(
|
||||
|
||||
const generateCode = () => {
|
||||
const layersStr = formatLayers(state.layerConfigs);
|
||||
return `:md-deck[${state.rawSrc || state.src}]{size="${state.sizeW}x${state.sizeH}" grid="${state.gridW}x${state.gridH}" bleed="${state.bleed}" padding="${state.padding}" layers="${layersStr}"}`;
|
||||
const parts = [
|
||||
`:md-deck[${state.rawSrc || state.src}]`,
|
||||
`{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}"`);
|
||||
}
|
||||
if (state.padding !== DECK_DEFAULTS.PADDING) {
|
||||
parts.push(`padding="${state.padding}"`);
|
||||
}
|
||||
|
||||
parts.push(`layers="${layersStr}"}`);
|
||||
return parts.join(' ');
|
||||
};
|
||||
|
||||
const copyCode = async () => {
|
||||
|
||||
Reference in New Issue
Block a user