refactor: replace all emoji icons with Element Plus SVG icons

Use @element-plus/icons-vue components for consistent, scalable vector
icons across sidebar navigation, section headers, ratings, and buttons.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
congsh
2026-04-17 21:36:44 +08:00
parent 4b97c99e56
commit 83b7472594
6 changed files with 31 additions and 22 deletions
@@ -3,6 +3,7 @@ import { ref, onMounted } from 'vue'
import { getGameComments, addComment } from '@/api/games'
import type { GameComment } from '@/types'
import { ElMessage } from 'element-plus'
import { StarFilled } from '@element-plus/icons-vue'
const props = defineProps<{ gameId: string }>()
@@ -56,7 +57,7 @@ function formatDate(dateStr: string) {
v-for="star in 5" :key="star"
class="star" :class="{ active: star <= newRating }"
@click="newRating = star"
></span>
><el-icon :size="20"><StarFilled /></el-icon></span>
<span v-if="newRating > 0" class="rating-clear" @click="newRating = 0">清除</span>
</div>
<div class="input-row">
@@ -71,7 +72,9 @@ function formatDate(dateStr: string) {
<div v-for="c in comments" :key="c.id" class="comment-item">
<div class="comment-header">
<span class="comment-author">{{ c.expand?.author?.username || '用户' }}</span>
<span v-if="c.rating" class="comment-rating">{{ ''.repeat(c.rating) }}</span>
<span v-if="c.rating" class="comment-rating">
<el-icon v-for="i in c.rating" :key="i" :size="12"><StarFilled /></el-icon>
</span>
<span class="comment-date">{{ formatDate(c.created) }}</span>
</div>
<p class="comment-content">{{ c.content }}</p>
@@ -3,6 +3,7 @@ import { computed, ref, onMounted } from 'vue'
import type { Game } from '@/types'
import { toggleFavorite, isFavorite, deleteGame } from '@/api/games'
import { ElMessage, ElMessageBox } from 'element-plus'
import { TrendCharts, StarFilled, Star, Delete } from '@element-plus/icons-vue'
import GameComments from './GameComments.vue'
const props = defineProps<{
@@ -68,7 +69,7 @@ function handleCreateTeam() {
<div class="detail-meta">
<span v-if="game.platform" class="platform-badge">{{ game.platform }}</span>
<span class="popularity">🔥 {{ game.popularCount }} 人游玩</span>
<span class="popularity"><el-icon><TrendCharts /></el-icon> {{ game.popularCount }} 人游玩</span>
</div>
<div v-if="game.tags?.length" class="detail-tags">
@@ -77,9 +78,10 @@ function handleCreateTeam() {
<div class="detail-actions">
<button class="fav-btn" :class="{ active: favorited }" @click="handleFavorite">
{{ favorited ? ' 已收藏' : ' 收藏' }}
<el-icon><StarFilled v-if="favorited" /><Star v-else /></el-icon>
{{ favorited ? '已收藏' : '收藏' }}
</button>
<button class="delete-detail-btn" @click="handleDelete">删除</button>
<button class="delete-detail-btn" @click="handleDelete"><el-icon><Delete /></el-icon> 删除</button>
</div>
<el-button type="primary" class="team-btn" @click="handleCreateTeam">