From 6f87463f10d7df9f7614480b0f6a1e5afe56527f Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 12 Jul 2024 10:15:52 +0800
Subject: [PATCH] =?UTF-8?q?feat(PageModal):=20:sparkles:=20=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95=E9=A1=B9=E5=A2=9E=E5=8A=A0col=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/CURD/PageForm.vue | 156 ++++++------
src/components/CURD/PageModal.vue | 383 ++++++++++++++++--------------
src/components/CURD/types.ts | 3 +
3 files changed, 297 insertions(+), 245 deletions(-)
diff --git a/src/components/CURD/PageForm.vue b/src/components/CURD/PageForm.vue
index 87224f12..524a6a4b 100644
--- a/src/components/CURD/PageForm.vue
+++ b/src/components/CURD/PageForm.vue
@@ -6,79 +6,95 @@
:model="formData"
:rules="formRules"
>
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ formData[item.prop] }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formData[item.prop] }}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CURD/PageModal.vue b/src/components/CURD/PageModal.vue
index 5dc4a70b..3d53e394 100644
--- a/src/components/CURD/PageModal.vue
+++ b/src/components/CURD/PageModal.vue
@@ -15,96 +15,111 @@
:model="formData"
:rules="formRules"
>
-
-
-
-
-
- {{ item.label }}
-
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ formData[item.prop] }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formData[item.prop] }}
+
+
+
+
+
+
+
+
+
+
@@ -137,99 +152,117 @@
:model="formData"
:rules="formRules"
>
-
-
-
-
-
- {{ item.label }}
-
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ formData[item.prop] }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formData[item.prop] }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CURD/types.ts b/src/components/CURD/types.ts
index af0cd7f9..97f4d834 100644
--- a/src/components/CURD/types.ts
+++ b/src/components/CURD/types.ts
@@ -5,6 +5,7 @@ import type {
FormProps,
PaginationProps,
TableProps,
+ ColProps,
} from "element-plus";
import PageContent from "./PageContent.vue";
import PageForm from "./PageForm.vue";
@@ -248,6 +249,8 @@ export type IFormItems = Array<{
initialValue?: any;
// 是否隐藏
hidden?: boolean;
+ // layout组件Col属性
+ col?: Partial;
// 监听函数
watch?: (newValue: any, oldValue: any, data: T, items: IObject[]) => void;
// 计算属性函数