From 563db933c063a947c9e12abeedc9593fec4a201b Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 3 May 2024 09:38:32 +0800
Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20:recycle:=20cURD=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81checkbox=E5=A4=9A?=
=?UTF-8?q?=E9=80=89=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageModal/index.vue | 25 +++++++++++++++++++++----
src/typings/auto-imports.d.ts | 4 ----
src/typings/components.d.ts | 3 +++
3 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/components/PageModal/index.vue b/src/components/PageModal/index.vue
index c357c9c0..d3cbc9e0 100644
--- a/src/components/PageModal/index.vue
+++ b/src/components/PageModal/index.vue
@@ -30,7 +30,7 @@
-
+
@@ -38,10 +38,21 @@
-
+
+
+
+
+
+
+
+
+
{
| "input"
| "select"
| "radio"
+ | "checkbox"
| "tree-select"
| "date-picker"
| "input-number"
| "custom";
// 组件属性
attrs?: IObject;
- // 组件可选项(适用于select,radio组件)
- options?: { label: string; value: any }[];
+ // 组件可选项(适用于select,radio,checkbox组件)
+ options?: Array<{
+ label: string;
+ value: any;
+ disabled?: boolean;
+ [key: string]: any;
+ }>;
// 插槽名(适用于组件类型为custom)
slotName?: string;
// 标签文本
diff --git a/src/typings/auto-imports.d.ts b/src/typings/auto-imports.d.ts
index 21e11afd..5f6d3a9b 100644
--- a/src/typings/auto-imports.d.ts
+++ b/src/typings/auto-imports.d.ts
@@ -325,14 +325,12 @@ declare module "vue" {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
- readonly ElForm: UnwrapRef<(typeof import("element-plus/es"))["ElForm"]>;
readonly ElMessage: UnwrapRef<
(typeof import("element-plus/es"))["ElMessage"]
>;
readonly ElMessageBox: UnwrapRef<
(typeof import("element-plus/es"))["ElMessageBox"]
>;
- readonly ElTree: UnwrapRef<(typeof import("element-plus/es"))["ElTree"]>;
readonly acceptHMRUpdate: UnwrapRef<
(typeof import("pinia"))["acceptHMRUpdate"]
>;
@@ -1055,14 +1053,12 @@ declare module "@vue/runtime-core" {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly EffectScope: UnwrapRef<(typeof import("vue"))["EffectScope"]>;
- readonly ElForm: UnwrapRef<(typeof import("element-plus/es"))["ElForm"]>;
readonly ElMessage: UnwrapRef<
(typeof import("element-plus/es"))["ElMessage"]
>;
readonly ElMessageBox: UnwrapRef<
(typeof import("element-plus/es"))["ElMessageBox"]
>;
- readonly ElTree: UnwrapRef<(typeof import("element-plus/es"))["ElTree"]>;
readonly acceptHMRUpdate: UnwrapRef<
(typeof import("pinia"))["acceptHMRUpdate"]
>;
diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts
index 7c38be9a..3a43493f 100644
--- a/src/typings/components.d.ts
+++ b/src/typings/components.d.ts
@@ -18,6 +18,8 @@ declare module "vue" {
ElBreadcrumbItem: (typeof import("element-plus/es"))["ElBreadcrumbItem"];
ElButton: (typeof import("element-plus/es"))["ElButton"];
ElCard: (typeof import("element-plus/es"))["ElCard"];
+ ElCheckbox: (typeof import("element-plus/es"))["ElCheckbox"];
+ ElCheckboxGroup: (typeof import("element-plus/es"))["ElCheckboxGroup"];
ElCol: (typeof import("element-plus/es"))["ElCol"];
ElColorPicker: (typeof import("element-plus/es"))["ElColorPicker"];
ElConfigProvider: (typeof import("element-plus/es"))["ElConfigProvider"];
@@ -32,6 +34,7 @@ declare module "vue" {
ElFormItem: (typeof import("element-plus/es"))["ElFormItem"];
ElIcon: (typeof import("element-plus/es"))["ElIcon"];
ElInput: (typeof import("element-plus/es"))["ElInput"];
+ ElInputNumber: (typeof import("element-plus/es"))["ElInputNumber"];
ElMenu: (typeof import("element-plus/es"))["ElMenu"];
ElMenuItem: (typeof import("element-plus/es"))["ElMenuItem"];
ElOption: (typeof import("element-plus/es"))["ElOption"];
From 5fc39d182ced5a185b8ce3d2ee066274b6a98ba5 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 3 May 2024 10:40:02 +0800
Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20:recycle:=20=E5=8A=A0=E5=BC=BAC?=
=?UTF-8?q?URD=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89=E7=B1=BB=E5=9E=8B=E7=9A=84=E4=BC=A0=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageModal/index.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/PageModal/index.vue b/src/components/PageModal/index.vue
index d3cbc9e0..292df2f1 100644
--- a/src/components/PageModal/index.vue
+++ b/src/components/PageModal/index.vue
@@ -73,6 +73,7 @@
From bf99b0091a8f9f425c1b7f0278f246501f4bb764 Mon Sep 17 00:00:00 2001
From: cshaptx4869 <994774638@qq.com>
Date: Fri, 3 May 2024 10:55:29 +0800
Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20:recycle:=20=E4=BF=AE=E6=94=B9C?=
=?UTF-8?q?URD=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89=E7=B1=BB=E5=9E=8B=E7=9A=84attrs=E4=BC=A0=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PageModal/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/PageModal/index.vue b/src/components/PageModal/index.vue
index 292df2f1..0cd56514 100644
--- a/src/components/PageModal/index.vue
+++ b/src/components/PageModal/index.vue
@@ -74,7 +74,7 @@
:name="item.slotName ?? item.prop"
:prop="item.prop"
:formData="formData"
- v-bind="item.attrs"
+ :attrs="item.attrs"
>