feat:【ele】【pay 支付】pay/app 代码优化 3/4(对齐 ele 和 antd)
This commit is contained in:
@@ -11,14 +11,14 @@ import { ElMessage } from 'element-plus';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { createApp, getApp, updateApp } from '#/api/pay/app';
|
||||
|
||||
import { useFormSchema } from '../data';
|
||||
import { useAppFormSchema } from '../data';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<PayAppApi.App>();
|
||||
const title = computed(() => {
|
||||
return formData.value?.id
|
||||
? $t('ui.actionTitle.edit', '应用')
|
||||
: $t('ui.actionTitle.create', '应用');
|
||||
? $t('ui.actionTitle.edit', ['应用'])
|
||||
: $t('ui.actionTitle.create', ['应用']);
|
||||
});
|
||||
|
||||
const [Form, formApi] = useVbenForm({
|
||||
@@ -30,7 +30,7 @@ const [Form, formApi] = useVbenForm({
|
||||
labelWidth: 160,
|
||||
},
|
||||
layout: 'horizontal',
|
||||
schema: useFormSchema(),
|
||||
schema: useAppFormSchema(),
|
||||
showDefaultActions: false,
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
modalApi.unlock();
|
||||
}
|
||||
},
|
||||
onOpenChange: async (isOpen) => {
|
||||
async onOpenChange(isOpen: boolean) {
|
||||
if (!isOpen) {
|
||||
formData.value = undefined;
|
||||
return;
|
||||
@@ -77,7 +77,7 @@ const [Modal, modalApi] = useVbenModal({
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<Modal :close-on-click-modal="false" :title="title" class="w-2/5">
|
||||
<Modal :title="title" class="w-2/5">
|
||||
<Form />
|
||||
</Modal>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user