feat: 添加 SubscribeRwa 组件,优化 RWA 申购功能并更新相关类型定义
This commit is contained in:
@@ -1,11 +1,36 @@
|
||||
<script lang='ts' setup>
|
||||
import type { Animation } from "@ionic/vue";
|
||||
import { createAnimation } from "@ionic/vue";
|
||||
import { cartOutline } from "ionicons/icons";
|
||||
|
||||
const model = defineModel<"sale" | "buy" | null>();
|
||||
|
||||
const operationInst = useTemplateRef<HTMLDivElement>("operationInst");
|
||||
const targetIsVisible = useElementVisibility(operationInst);
|
||||
const animation = ref<Animation | null>(null);
|
||||
|
||||
watch(targetIsVisible, (visible) => {
|
||||
if (visible) {
|
||||
animation.value?.easing("ease-in")
|
||||
.fromTo("opacity", "0", "1")
|
||||
.play();
|
||||
}
|
||||
else {
|
||||
animation.value?.easing("ease-out")
|
||||
.fromTo("opacity", "1", "0")
|
||||
.play();
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
animation.value = createAnimation()
|
||||
.addElement(operationInst.value!)
|
||||
.duration(500);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="model === null" class="operation-container">
|
||||
<div v-if="model === null" ref="operationInst" class="operation-container">
|
||||
<div class="wrapper" />
|
||||
|
||||
<div class="box">
|
||||
|
||||
@@ -3,18 +3,17 @@ import { cartOutline } from "ionicons/icons";
|
||||
import OperationWrapper from "./components/operation-wrapper.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const current = ref<"sale" | "buy" | null>(null);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonToolbar>
|
||||
<IonHeader class="ion-no-border">
|
||||
<ion-toolbar class="ui-toolbar">
|
||||
<IonTitle>{{ t('tabs.trade') }}</IonTitle>
|
||||
</IonToolbar>
|
||||
</ion-toolbar>
|
||||
</IonHeader>
|
||||
<IonContent :fullscreen="true">
|
||||
<OperationWrapper v-model="current" />
|
||||
<!-- <OperationWrapper v-model="current" /> -->
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user