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