feat: 更新环境变量,修复 TradingView 相关配置;优化 TradingViewChart 组件的使用方式
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { ChartingLibraryWidgetOptions } from "#/charting_library";
|
||||
import { caretDownOutline, ellipsisHorizontal } from "ionicons/icons";
|
||||
import MaterialSymbolsCandlestickChartOutline from "~icons/material-symbols/candlestick-chart-outline";
|
||||
import { TradingViewChart } from "@/tradingview/index";
|
||||
@@ -7,6 +8,12 @@ import TradeSwitch from "./components/trade-switch.vue";
|
||||
import TradeWay from "./components/trade-way.vue";
|
||||
|
||||
const mode = ref<"buy" | "sell">("buy");
|
||||
const tradingviewOptions: Partial<ChartingLibraryWidgetOptions> = {
|
||||
symbol: "BTC/USDT",
|
||||
disabled_features: [
|
||||
"create_volume_indicator_by_default",
|
||||
],
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -33,6 +40,8 @@ const mode = ref<"buy" | "sell">("buy");
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content :fullscreen="true">
|
||||
<TradingViewChart class="mb-5" height="300px" :options="tradingviewOptions" />
|
||||
|
||||
<div class="grid grid-cols-5 px-4">
|
||||
<div class="col-span-3 space-y-2">
|
||||
<TradeSwitch v-model:active="mode" />
|
||||
@@ -47,8 +56,7 @@ const mode = ref<"buy" | "sell">("buy");
|
||||
</div>
|
||||
<div class="col-span-2" />
|
||||
</div>
|
||||
<TradingViewChart class="my-5" />
|
||||
<div class="mt-6 px-4">
|
||||
<div class="mt-6 px-4 pb-4">
|
||||
<OrdersPanel />
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user