算法与视觉优化

This commit is contained in:
stardrophere
2026-04-02 13:48:33 +08:00
parent 943770b2bc
commit 61b6357418
6 changed files with 113 additions and 40 deletions
@@ -111,6 +111,14 @@ function getRankingChartOptions(history: number[], platformColor: string) {
height: 56,
sparkline: { enabled: true },
animations: { enabled: true, easing: 'easeinout' as const, speed: 400 },
events: {
mounted: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
},
updated: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
}
}
},
stroke: { curve: 'smooth' as const, width: 2 },
fill: {
+8
View File
@@ -182,6 +182,14 @@ function getRankingChartOptions(history: number[], platformColor: string) {
height: 56,
sparkline: { enabled: true },
animations: { enabled: true, easing: 'easeinout' as const, speed: 400 },
events: {
mounted: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
},
updated: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
}
}
},
stroke: { curve: 'smooth' as const, width: 2 },
fill: {
+12 -2
View File
@@ -72,6 +72,12 @@ const chartOptions = ref<ApexOptions>({
},
// 点击图表数据点:切换选中时间,再次点击则取消筛选
events: {
mounted: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
},
updated: (chartContext: any) => {
chartContext.el?.querySelector('.apexcharts-svg > title')?.remove()
},
markerClick: function(event: unknown, chartContext: unknown, { dataPointIndex }: never) {
if (searchResult.value && searchResult.value.timeline[dataPointIndex]) {
const clickedTime = searchResult.value.timeline[dataPointIndex].time_label
@@ -585,7 +591,12 @@ async function handleSearch() {
.chart-container {
margin-top: 16px;
margin-left: -10px; /* 视觉上抵消 apexcharts 的默认左侧留白。 */
margin-left: -10px;
}
.chart-container :deep(svg),
.chart-container :deep(canvas) {
outline: none;
}
.events-section {
@@ -595,7 +606,6 @@ async function handleSearch() {
.events-grid {
display: flex;
flex-direction: column;
/* 与 DashboardView 保持一致,列表按纵向堆叠展示。 */
}
.loading-state {
+1 -1
View File
@@ -156,7 +156,7 @@ onMounted(async () => {
v-model="newKeyword"
type="text"
class="keyword-input"
placeholder="输入关键词,如「直升机」「科比」「佐巴扬」..."
placeholder="输入关键词,如「篮球」「科比」「科技」..."
maxlength="100"
@keydown="onInputKeydown"
/>