fix: 更新 @riwa/api-types 依赖的版本和路径,添加资产记录路由的类型参数
This commit is contained in:
@@ -106,7 +106,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
meta: { requiresAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/asset_record/:code",
|
||||
path: "/asset_record/:code/:type?",
|
||||
props: true,
|
||||
component: () => import("@/views/wallet/asset-record.vue"),
|
||||
meta: { requiresAuth: true },
|
||||
|
||||
@@ -4,11 +4,12 @@ import type { AssetRecordBody, AssetRecordData } from "@/api/types";
|
||||
import IconParkOutlineTransaction from "~icons/icon-park-outline/transaction";
|
||||
import { client, safeClient } from "@/api";
|
||||
|
||||
const props = defineProps<{ code: string }>();
|
||||
const props = defineProps<{ code: string; type?: "funding" | "trading" }>();
|
||||
const [query, resetQuery] = useResetRef<AssetRecordBody>({
|
||||
limit: 20,
|
||||
offset: 0,
|
||||
assetCode: props.code,
|
||||
accountType: props.type || undefined,
|
||||
});
|
||||
|
||||
const data = ref<AssetRecordData[]>([]);
|
||||
|
||||
@@ -41,7 +41,7 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<ion-list lines="none" class="space-y-5 mt-2!">
|
||||
<ion-item v-for="asset, i in fundingBalances" :key="i">
|
||||
<ion-item v-for="asset, i in fundingBalances" :key="i" @click="$router.push(`/asset_record/${asset.assetCode}/funding`)">
|
||||
<div class="flex items-center space-x-3 flex-1">
|
||||
<Icon :icon="asset.asset.iconUrl || ''" class="w-8 h-8" />
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<ion-list lines="none" class="space-y-5 mt-2!">
|
||||
<ion-item v-for="asset, i in tradingBalances" :key="i">
|
||||
<ion-item v-for="asset, i in tradingBalances" :key="i" @click="$router.push(`/asset_record/${asset.assetCode}/trading`)">
|
||||
<div class="flex items-center space-x-3 flex-1">
|
||||
<Icon :icon="asset.asset.iconUrl || ''" class="w-8 h-8" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user