feat: 添加新闻详情导航功能,优化交易视图高度设置
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user