feat:【antd】【ele】【pay 支付】pay/order 在 ele 代码优化

This commit is contained in:
YunaiV
2025-10-05 21:12:25 +08:00
parent 73e64b468a
commit 112a7dfb93
5 changed files with 71 additions and 50 deletions

View File

@@ -8,6 +8,7 @@ import { ElTag } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getOrderPage } from '#/api/pay/order';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
import Detail from './modules/detail.vue';
@@ -18,7 +19,7 @@ const [DetailModal, detailModalApi] = useVbenModal({
});
/** 刷新表格 */
function onRefresh() {
function handleRefresh() {
gridApi.query();
}
@@ -30,7 +31,6 @@ function handleDetail(row: PayOrderApi.Order) {
const [Grid, gridApi] = useVbenVxeGrid({
formOptions: {
schema: useGridFormSchema(),
collapsed: false,
},
gridOptions: {
cellConfig: {
@@ -52,9 +52,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
},
rowConfig: {
keyField: 'id',
isCurrent: true,
isHover: true,
resizable: true,
},
toolbarConfig: {
refresh: true,
@@ -80,7 +78,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
url="https://doc.iocoder.cn/pay/wx-lite-pay-demo/"
/>
</template>
<DetailModal @success="onRefresh" />
<DetailModal @success="handleRefresh" />
<Grid table-title="支付订单列表">
<template #actions="{ row }">
<TableAction