feat: 更新 @riwa/api-types 依赖至 0.0.89,优化交易对和图表组件
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { ChartingLibraryWidgetOptions } from "#/charting_library";
|
||||
import type { TradingViewInst } from "@/tradingview/index";
|
||||
import { modalController } from "@ionic/vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { caretDownOutline, ellipsisHorizontal } from "ionicons/icons";
|
||||
@@ -20,19 +21,11 @@ const tradingviewOptions: Partial<ChartingLibraryWidgetOptions> = {
|
||||
"create_volume_indicator_by_default",
|
||||
],
|
||||
};
|
||||
|
||||
const { data } = safeClient(client.api.trading_pairs.get());
|
||||
const tradingViewInst = useTemplateRef<TradingViewInst>("tradingViewInst");
|
||||
|
||||
async function openTradePairs() {
|
||||
if (!data.value)
|
||||
return;
|
||||
|
||||
const modal = await modalController.create({
|
||||
component: TradePairsModal,
|
||||
componentProps: {
|
||||
tradingPairs: data.value,
|
||||
currentSymbol: symbol.value,
|
||||
},
|
||||
breakpoints: [0, 0.95],
|
||||
initialBreakpoint: 0.95,
|
||||
handle: true,
|
||||
@@ -72,7 +65,7 @@ async function openTradePairs() {
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content :fullscreen="true">
|
||||
<TradingViewChart class="mb-5" height="300px" :symbol="symbol" :options="tradingviewOptions" />
|
||||
<TradingViewChart ref="tradingViewInst" class="mb-5" height="300px" :symbol="symbol" :options="tradingviewOptions" />
|
||||
|
||||
<div class="grid grid-cols-5 px-4">
|
||||
<div class="col-span-3 space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user