feat:【antd】【ele】【pay 支付】pay/demo/order 迁移 antd 版本
This commit is contained in:
@@ -21,13 +21,13 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
options: [
|
||||||
{ label: '华为手机', value: 1 },
|
{ label: '华为手机 --- 1.00元', value: 1 },
|
||||||
{ label: '小米电视', value: 2 },
|
{ label: '小米电视 --- 10.00元', value: 2 },
|
||||||
{ label: '苹果手表', value: 3 },
|
{ label: '苹果手表 --- 100.00元', value: 3 },
|
||||||
{ label: '华硕笔记本', value: 4 },
|
{ label: '华硕笔记本 --- 1000.00元', value: 4 },
|
||||||
{ label: '蔚来汽车', value: 5 },
|
{ label: '蔚来汽车 --- 200000.00元', value: 5 },
|
||||||
],
|
],
|
||||||
placeholder: '请输入下单商品',
|
placeholder: '请选择下单商品',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { message } from 'ant-design-vue';
|
|||||||
|
|
||||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
import { getDemoOrderPage, refundDemoOrder } from '#/api/pay/demo/order';
|
import { getDemoOrderPage, refundDemoOrder } from '#/api/pay/demo/order';
|
||||||
import { $t } from '#/locales';
|
|
||||||
|
|
||||||
import { useGridColumns } from './data';
|
import { useGridColumns } from './data';
|
||||||
import Form from './modules/form.vue';
|
import Form from './modules/form.vue';
|
||||||
@@ -58,7 +57,6 @@ async function handleRefund(row: DemoOrderApi.Order) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
gridOptions: {
|
gridOptions: {
|
||||||
columns: useGridColumns(),
|
columns: useGridColumns(),
|
||||||
@@ -83,7 +81,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
refresh: true,
|
refresh: true,
|
||||||
},
|
},
|
||||||
} as VxeTableGridOptions<DemoOrderApi.Order>,
|
} as VxeTableGridOptions<DemoOrderApi.Order>,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -127,7 +125,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
{
|
{
|
||||||
label: '前往支付',
|
label: '前往支付',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: ACTION_ICON.VIEW,
|
icon: ACTION_ICON.ADD,
|
||||||
ifShow: !row.payStatus,
|
ifShow: !row.payStatus,
|
||||||
onClick: handlePay.bind(null, row),
|
onClick: handlePay.bind(null, row),
|
||||||
},
|
},
|
||||||
@@ -135,10 +133,10 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
label: '发起退款',
|
label: '发起退款',
|
||||||
type: 'link',
|
type: 'link',
|
||||||
danger: true,
|
danger: true,
|
||||||
icon: ACTION_ICON.REFUND,
|
icon: ACTION_ICON.EDIT,
|
||||||
ifShow: row.payStatus && !row.payRefundId,
|
ifShow: row.payStatus && !row.payRefundId,
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
title: `是否确认退款编号为"${row.id}"的示例订单?`,
|
title: '确定发起退款吗?',
|
||||||
confirm: handleRefund.bind(null, row),
|
confirm: handleRefund.bind(null, row),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
// 关闭并提示
|
// 关闭并提示
|
||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
message.success($t('common.createSuccess'));
|
message.success($t('ui.actionMessage.operationSuccess'));
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Modal class="w-2/5" title="发起订单">
|
<Modal class="w-1/4" title="发起订单">
|
||||||
<Form class="mx-4" />
|
<Form class="mx-4" />
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user