Commit 29f661c9a8

29f661c9a8bfa787c917b46e6fb3916f2c203ada

parent: 384d5a58d7

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-24 07:20 UTC

Update HomeFeatures.vue

Layout: unified · split

docs/.vitepress/theme/components/HomeFeatures.vue +2 −2
@@ -1,6 +1,5 @@
1<script setup lang="ts"> 1<script setup lang="ts">
2import { computed, ref, watch } from 'vue' 2import { computed, ref, watch } from 'vue'
3import { renderEmojiShortcodes } from '../../configs/markdown/emoji'
4import type { HomeCard } from '../../configs/constants' 3import type { HomeCard } from '../../configs/constants'
5 4
6const props = defineProps<{ cards: HomeCard[] }>() 5const props = defineProps<{ cards: HomeCard[] }>()
@@ -55,7 +54,8 @@ const grid = computed(() => {
55}) 54})
56 55
57function cardIcon(card: HomeCard) { 56function cardIcon(card: HomeCard) {
58 return renderEmojiShortcodes(card.icon) 57 return card.icon.replace(/:([A-Za-z0-9_+-]+):/g, (_, markup) =>
58 `<span class="i-${markup}"></span>`)
59} 59}
60 60
61/* ── Manager panel ── */ 61/* ── Manager panel ── */