feat: 添加新闻详情导航功能,优化交易视图高度设置

This commit is contained in:
2025-12-28 01:01:00 +07:00
parent 528f026a5b
commit 9ef64ad961
2 changed files with 8 additions and 1 deletions

View File

@@ -24,6 +24,12 @@ function formatTime(time: string) {
} }
return date.toLocaleDateString("zh-CN", { month: "2-digit", day: "2-digit" }); return date.toLocaleDateString("zh-CN", { month: "2-digit", day: "2-digit" });
} }
const router = useRouter();
function openNewsDetail(item: NewsItem) {
router.push(`/news/${item.id}`);
}
</script> </script>
<template> <template>

View File

@@ -20,6 +20,7 @@ const { series } = useTradingView(tradingViewContainer, {
{ time: "2023-10-07", open: 44800, high: 45500, low: 44500, close: 43250 }, { time: "2023-10-07", open: 44800, high: 45500, low: 44500, close: 43250 },
], ],
weightChartOptions: { weightChartOptions: {
height: 180,
rightPriceScale: { rightPriceScale: {
visible: false, visible: false,
}, },
@@ -80,7 +81,7 @@ const tradeAction = ref<"buy" | "sell">("buy");
<style scoped> <style scoped>
.chart-container { .chart-container {
height: 300px; height: 180px;
width: 100%; width: 100%;
} }