<template>
  <Dialog :title="dialogTitle" v-model="dialogVisible" width="800">
    <CurrencyTransactionList :currency-id="currencyId" />
    <template #footer>
      <el-button @click="dialogVisible = false">取 消</el-button>
    </template>
  </Dialog>
</template>

<script setup lang="ts">
import CurrencyTransactionList from '../transaction/CurrencyTransactionList.vue'

const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const currencyId = ref(0)
/** 打开弹窗 */
const open = async (theCurrencyId: number) => {
  dialogVisible.value = true
  dialogTitle.value = '钱包余额明细'
  currencyId.value = theCurrencyId
}
defineExpose({ open }) // 提供 open 方法，用于打开弹窗
</script>
