|
|
@@ -1,7 +1,7 @@
|
|
|
<!-- 现货-账户 -->
|
|
|
<template>
|
|
|
<app-block class="spot-account">
|
|
|
- <template v-for="(item, index) in spotAccountStore.dataList" :key="index">
|
|
|
+ <template v-for="(item, index) in accountList" :key="index">
|
|
|
<div class="card">
|
|
|
<div class="card-section">
|
|
|
<div class="card-section__image">
|
|
|
@@ -42,7 +42,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent } from 'vue'
|
|
|
+import { shallowRef, defineAsyncComponent, computed, PropType } from 'vue'
|
|
|
import { Button, Icon } from 'vant'
|
|
|
import { formatDecimal, getCurrencyIconUrl } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
@@ -51,15 +51,32 @@ import { useSpotAccountStore } from './composables'
|
|
|
import { i18n } from '@/stores'
|
|
|
import AppImageIcon from '@mobile/components/base/image-icon/index.vue'
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ params: {
|
|
|
+ type: Object as PropType<Partial<Model.TaaccountDigitalsRsp>>
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const componentMap = new Map<string, unknown>([
|
|
|
+ ['Activate', defineAsyncComponent(() => import('../../../spot/components/account/activate/index.vue'))], // 激活
|
|
|
+])
|
|
|
+
|
|
|
const emit = defineEmits(['click'])
|
|
|
|
|
|
const { t } = i18n.global
|
|
|
const spotAccountStore = useSpotAccountStore()
|
|
|
const selectedRow = shallowRef<Model.TaaccountDigitalsRsp>()
|
|
|
|
|
|
-const componentMap = new Map<string, unknown>([
|
|
|
- ['Activate', defineAsyncComponent(() => import('../../../spot/components/account/activate/index.vue'))], // 激活
|
|
|
-])
|
|
|
+const accountList = computed(() => {
|
|
|
+ if (props.params) {
|
|
|
+ const { currencycode } = props.params
|
|
|
+ if (currencycode) {
|
|
|
+ return spotAccountStore.dataList.filter((e) => e.currencycode.toLowerCase().includes(currencycode.toLowerCase()))
|
|
|
+ }
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ return spotAccountStore.dataList
|
|
|
+})
|
|
|
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent()
|
|
|
|