WalletForm.vue 852 B

12345678910111213141516171819202122
  1. <template>
  2. <Dialog :title="dialogTitle" v-model="dialogVisible" width="800">
  3. <WalletTransactionList :wallet-id="walletId" />
  4. <template #footer>
  5. <el-button @click="dialogVisible = false">取 消</el-button>
  6. </template>
  7. </Dialog>
  8. </template>
  9. <script setup lang="ts">
  10. import WalletTransactionList from '../transaction/WalletTransactionList.vue'
  11. const dialogVisible = ref(false) // 弹窗的是否展示
  12. const dialogTitle = ref('') // 弹窗的标题
  13. const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
  14. const walletId = ref(0)
  15. /** 打开弹窗 */
  16. const open = async (theWalletId: number) => {
  17. dialogVisible.value = true
  18. dialogTitle.value = '钱包余额明细'
  19. walletId.value = theWalletId
  20. }
  21. defineExpose({ open }) // 提供 open 方法,用于打开弹窗
  22. </script>