From 02795947caa7d8f960284495e6641c684b855b1d Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 18 Dec 2024 14:40:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=20post=20=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/post/index.vue | 8 +------- apps/web-antd/src/views/system/post/post-form.vue | 10 ++++++++++ apps/web-antd/src/views/system/post/post.data.ts | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/web-antd/src/views/system/post/index.vue b/apps/web-antd/src/views/system/post/index.vue index 371032c9d..203e84aa2 100644 --- a/apps/web-antd/src/views/system/post/index.vue +++ b/apps/web-antd/src/views/system/post/index.vue @@ -115,15 +115,9 @@ async function handleExport() { onClick: handleDelete.bind(null, row.id), }, ]" - :drop-down-actions="[ - { - type: 'link', - label: $t('page.action.edit'), - }, - ]" /> - + diff --git a/apps/web-antd/src/views/system/post/post-form.vue b/apps/web-antd/src/views/system/post/post-form.vue index 24559d77b..7a37fc73d 100644 --- a/apps/web-antd/src/views/system/post/post-form.vue +++ b/apps/web-antd/src/views/system/post/post-form.vue @@ -11,9 +11,18 @@ import { modalSchema } from './post.data'; defineOptions({ name: 'PostModel' }); +const emit = defineEmits(['reload']); + const isUpdate = ref(false); const [Form, formApi] = useVbenForm({ + // 所有表单项共用,可单独在表单内覆盖 + commonConfig: { + // 所有表单项 + componentProps: { + class: 'w-full', + }, + }, schema: modalSchema, handleSubmit: onSubmit, showDefaultActions: false, @@ -47,6 +56,7 @@ async function onSubmit(values: Record) { : createPost(values as any)); modalApi.close(); await formApi.resetForm(); + emit('reload'); }