feat: 更新 @riwa/api-types 依赖地址,优化语言加载逻辑
This commit is contained in:
@@ -3,6 +3,7 @@ import { authClient, modelControllerLogin, modelControllerSignup } from "@/auth"
|
||||
|
||||
const page = useTemplateRef<PageInstance>("page");
|
||||
const { user } = useAuth();
|
||||
const tradingViewContainer = useTemplateRef<HTMLElement>("tradingViewContainer");
|
||||
|
||||
async function openSignin() {
|
||||
const modal = await modelControllerLogin(page.value?.$el);
|
||||
@@ -15,6 +16,19 @@ async function openSignup() {
|
||||
async function handleLogout() {
|
||||
await authClient.signOut();
|
||||
}
|
||||
|
||||
useTradingView(tradingViewContainer, {
|
||||
data: [
|
||||
// 随机k线图数据
|
||||
{ time: "2023-10-01", open: 100, high: 110, low: 90, close: 105 },
|
||||
{ time: "2023-10-02", open: 105, high: 115, low: 95, close: 100 },
|
||||
{ time: "2023-10-03", open: 100, high: 120, low: 80, close: 110 },
|
||||
{ time: "2023-10-04", open: 110, high: 130, low: 100, close: 120 },
|
||||
{ time: "2023-10-05", open: 120, high: 140, low: 110, close: 130 },
|
||||
{ time: "2023-10-06", open: 130, high: 150, low: 120, close: 140 },
|
||||
{ time: "2023-10-07", open: 140, high: 160, low: 130, close: 150 },
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -34,7 +48,7 @@ async function handleLogout() {
|
||||
<IonButton @click="handleLogout">
|
||||
Log out
|
||||
</IonButton>
|
||||
|
||||
<div ref="tradingViewContainer" />
|
||||
{{ user }}
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
|
||||
Reference in New Issue
Block a user