perf: MFM MkA, MkLink, MkSparkle の slot 指定方法を修正 (#17156)

This commit is contained in:
果物リン
2026-02-28 15:47:29 +09:00
committed by GitHub
parent 676e164634
commit ae1304d645

View File

@@ -233,7 +233,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
if (!useAnim) { if (!useAnim) {
return genEl(token.children, scale); return genEl(token.children, scale);
} }
return h(MkSparkle, {}, genEl(token.children, scale)); return h(MkSparkle, {}, { default: () => genEl(token.children, scale) });
} }
case 'rotate': { case 'rotate': {
const degrees = safeParseFloat(token.props.args.deg) ?? 90; const degrees = safeParseFloat(token.props.args.deg) ?? 90;
@@ -363,7 +363,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
url: token.props.url, url: token.props.url,
rel: 'nofollow noopener', rel: 'nofollow noopener',
navigationBehavior: props.linkNavigationBehavior, navigationBehavior: props.linkNavigationBehavior,
}, genEl(token.children, scale, true))]; }, { default: () => genEl(token.children, scale, true) })];
} }
case 'mention': { case 'mention': {
@@ -381,7 +381,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`, to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
style: 'color:var(--MI_THEME-hashtag);', style: 'color:var(--MI_THEME-hashtag);',
behavior: props.linkNavigationBehavior, behavior: props.linkNavigationBehavior,
}, `#${token.props.hashtag}`)]; }, { default: () => `#${token.props.hashtag}` })];
} }
case 'blockCode': { case 'blockCode': {