feat: 添加国际化支持,更新市场和交易视图中的文本,优化用户体验
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang='ts' setup>
|
||||
import { client, safeClient } from "@/api";
|
||||
|
||||
const { t } = useI18n();
|
||||
const model = defineModel({ type: String, default: "" });
|
||||
|
||||
const { data: categories } = await safeClient(() => client.api.rwa.issuance.categories.get());
|
||||
@@ -10,7 +11,7 @@ const { data: categories } = await safeClient(() => client.api.rwa.issuance.cate
|
||||
<ion-content :scroll-x="true" :scroll-y="false" class="w-full h-6">
|
||||
<div class="flex items-center whitespace-nowrap space-x-4">
|
||||
<div class="item" :class="{ active: model === '' }" @click="model = ''">
|
||||
全部
|
||||
{{ t('market.category.all') }}
|
||||
</div>
|
||||
<div
|
||||
v-for="item in categories?.data"
|
||||
|
||||
@@ -4,6 +4,8 @@ import type { RwaData } from "@/api/types";
|
||||
defineProps<{
|
||||
data: RwaData["data"];
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -12,21 +14,21 @@ defineProps<{
|
||||
<ion-grid>
|
||||
<ion-row class="ion-align-items-center text-xs">
|
||||
<ion-col size="6">
|
||||
<div>名称/代码</div>
|
||||
<div>{{ t('market.rwaList.nameCode') }}</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="text-right">
|
||||
阶段
|
||||
{{ t('market.rwaList.stage') }}
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="text-right">
|
||||
发行日期
|
||||
{{ t('market.rwaList.issueDate') }}
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div class="text-right">
|
||||
申购单价
|
||||
{{ t('market.rwaList.subscriptionPrice') }}
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@@ -5,6 +5,8 @@ import { client, safeClient } from "@/api";
|
||||
import Category from "./components/category.vue";
|
||||
import RwaList from "./components/rwa-list.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const [query] = useResetRef<AvailableSubscriptionBody>({
|
||||
limit: 20,
|
||||
offset: 0,
|
||||
@@ -59,7 +61,7 @@ onBeforeMount(() => {
|
||||
<template>
|
||||
<IonPage>
|
||||
<IonHeader class="ion-padding ui-header">
|
||||
<ion-searchbar placeholder=" Search" />
|
||||
<ion-searchbar :placeholder="t('market.search.placeholder')" />
|
||||
<Category v-model="query!.categoryId" />
|
||||
</IonHeader>
|
||||
<IonContent :fullscreen="true" class="ion-padding">
|
||||
@@ -72,7 +74,7 @@ onBeforeMount(() => {
|
||||
<ion-infinite-scroll threshold="100px" @ion-infinite="handleInfinite">
|
||||
<ion-infinite-scroll-content
|
||||
loading-spinner="bubbles"
|
||||
loading-text="加载更多..."
|
||||
:loading-text="t('market.loading.loadingMore')"
|
||||
/>
|
||||
</ion-infinite-scroll>
|
||||
</IonContent>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { cartOutline } from "ionicons/icons";
|
||||
import OperationWrapper from "./components/operation-wrapper.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const current = ref<"sale" | "buy" | null>(null);
|
||||
</script>
|
||||
|
||||
@@ -9,7 +10,7 @@ const current = ref<"sale" | "buy" | null>(null);
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonToolbar>
|
||||
<IonTitle>Market</IonTitle>
|
||||
<IonTitle>{{ t('tabs.trade') }}</IonTitle>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
<IonContent :fullscreen="true">
|
||||
|
||||
Reference in New Issue
Block a user