fix(player): PC端资金明细列表点击改为弹窗展示 - DesktopWalletDetailView 列表项点击从 router.push 改为打开 DesktopTxDetailModal 弹窗

This commit is contained in:
mars
2026-07-10 15:08:32 +08:00
parent 49594110a5
commit 14268eccaa

View File

@@ -1,16 +1,23 @@
<script setup lang="ts">
import { ref, onMounted, onActivated } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import api from '../../api';
import GoldSpinner from '../../components/GoldSpinner.vue';
import Pagination from '../../components/desktop/Pagination.vue';
import DesktopWalletPageHeader from '../../components/desktop/DesktopWalletPageHeader.vue';
import DesktopTxDetailModal from '../../components/desktop/DesktopTxDetailModal.vue';
import { formatMoney } from '../../utils/localeDisplay';
import { txTypeKey, txDisplayType, txAmountClass, txSummaryLabel } from '../../utils/walletTx';
const { t, locale } = useI18n();
const router = useRouter();
const detailModalVisible = ref(false);
const detailTxId = ref<string | null>(null);
function openDetail(txId: string) {
detailTxId.value = txId;
detailModalVisible.value = true;
}
type Transaction = {
transactionType: string;
@@ -88,7 +95,7 @@ onActivated(() => fetchData(page.value));
v-for="tx in items"
:key="tx.transactionId"
class="hover-row"
@click="router.push(`/wallet/transactions/${tx.transactionId}`)"
@click="openDetail(tx.transactionId)"
>
<td class="type-cell">{{ txLabel(tx) }}</td>
<td class="muted-cell">{{ txSummaryLabel(tx, t) || '-' }}</td>
@@ -112,6 +119,12 @@ onActivated(() => fetchData(page.value));
<section v-else class="desktop-records-panel">
<div class="desktop-records-empty">{{ t('wallet.no_records') }}</div>
</section>
<DesktopTxDetailModal
:visible="detailModalVisible"
:transaction-id="detailTxId"
@update:visible="detailModalVisible = $event"
/>
</div>
</template>