feat: AppModal AppFormModal
This commit is contained in:
@@ -22,22 +22,22 @@ function onRefresh() {
|
|||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
const [AppModal, appModalApi] = useVbenModal({
|
const [AppFormModal, appFormModalApi] = useVbenModal({
|
||||||
connectedComponent: appFrom,
|
connectedComponent: appFrom,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [ChannelModal, channelModalApi] = useVbenModal({
|
const [ChannelFormModal, channelFormModalApi] = useVbenModal({
|
||||||
connectedComponent: channelFrom,
|
connectedComponent: channelFrom,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleCreate() {
|
function handleCreate() {
|
||||||
appModalApi.setData(null).open();
|
appFormModalApi.setData(null).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEdit(row: Required<PayAppApi.App>) {
|
function handleEdit(row: Required<PayAppApi.App>) {
|
||||||
appModalApi.setData({ id: row.id }).open();
|
appFormModalApi.setData({ id: row.id }).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(row: Required<PayAppApi.App>) {
|
async function handleDelete(row: Required<PayAppApi.App>) {
|
||||||
@@ -101,7 +101,7 @@ function isChannelExists(channels: string[], channelCode: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function openChannelForm(row: PayAppApi.App, payCode: string) {
|
async function openChannelForm(row: PayAppApi.App, payCode: string) {
|
||||||
channelModalApi.setData({ id: row.id, payCode }).open();
|
channelFormModalApi.setData({ id: row.id, payCode }).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
@@ -140,9 +140,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" />
|
<DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- TODO @xingyu:建议和别的一致,Modal => FormModal -->
|
<AppFormModal @success="onRefresh" />
|
||||||
<AppModal @success="onRefresh" />
|
<ChannelFormModal @success="onRefresh" />
|
||||||
<ChannelModal @success="onRefresh" />
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
|
|||||||
Reference in New Issue
Block a user