\ No newline at end of file
diff --git a/client/src/components/Icon.vue b/client/src/components/Icon.vue
index fb9eaf6..4d4e44b 100644
--- a/client/src/components/Icon.vue
+++ b/client/src/components/Icon.vue
@@ -3,7 +3,7 @@
:is="iconComponent"
:class="className"
:style="style"
- :size="size"
+ :size="iconSize"
/>
@@ -35,4 +35,13 @@ const iconComponent = computed(() => {
const iconName = toPascalCase(props.name) as keyof typeof LucideIcons
return LucideIcons[iconName] || LucideIcons.AlertCircle
})
+
+// 确保 size 是 number 类型
+const iconSize = computed(() => {
+ if (typeof props.size === 'string') {
+ const parsed = parseInt(props.size, 10)
+ return isNaN(parsed) ? 24 : parsed
+ }
+ return props.size ?? 24
+})
\ No newline at end of file
diff --git a/client/src/components/StarBackground.vue b/client/src/components/StarBackground.vue
index a45e1ac..4696321 100644
--- a/client/src/components/StarBackground.vue
+++ b/client/src/components/StarBackground.vue
@@ -198,7 +198,7 @@ const updateAndDrawParticles = () => {
}
}
-const createMeteor = (force = false) => {
+const createMeteor = () => {
const startX = Math.random() * width
const angle = Math.PI / 4 // 45度
meteors.push({
diff --git a/client/src/pages/BlogDetail.vue b/client/src/pages/BlogDetail.vue
index 495b8eb..33fa685 100644
--- a/client/src/pages/BlogDetail.vue
+++ b/client/src/pages/BlogDetail.vue
@@ -381,8 +381,8 @@ md.renderer.rules.fence = function (tokens, idx) {
const lines = token.content.trimEnd().split('\n')
const lineNumbers = lines.map((_, i) => i + 1).join('\n')
- // SVG Icon 手动嵌入,不使用 Icon 组件
- const copyIconSvg = `
`
+ // 修复1: 显式定义的 SVG Icon,颜色更亮 (text-white/70),去除复杂 opacity 类
+ const copyIconSvg = `
@@ -396,10 +396,10 @@ md.renderer.rules.fence = function (tokens, idx) {
${langName || 'TEXT'}