From 0e85cb2dd5b1b83f8b81cbf1344ed59aad366392 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=83=A1=E5=B0=91=E7=BF=94?= <971366405@qq.com>
Date: Fri, 2 Aug 2024 10:23:22 +0800
Subject: [PATCH 1/3] =?UTF-8?q?fix:=20:bug:=20=E7=99=BB=E5=BD=95=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=99=BB=E5=BD=95=E5=B1=9E=E6=80=A7=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
登录页面登录属性增加验证码属性
---
src/views/login/index.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index f43353ea..4ebe87c3 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -91,13 +91,14 @@
size="large"
class="w-full"
@click.prevent="handleLoginSubmit"
- >{{ $t("login.login") }}
+ >
+ {{ $t("login.login") }}
{{ $t("login.username") }}: admin
- {{ $t("login.password") }}: 123456
+ {{ $t("login.password") }}: 123456
@@ -155,6 +156,8 @@ const loginFormRef = ref();
const loginData = ref({
username: "admin",
password: "123456",
+ captchaKey: "",
+ captchaCode: "",
} as LoginData);
const loginRules = computed(() => {
From af34b28016d95c420aff0368f243524f1c3e4eee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=83=A1=E5=B0=91=E7=BF=94?= <971366405@qq.com>
Date: Fri, 2 Aug 2024 10:51:19 +0800
Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20:recycle:=20=E5=A2=9E=E5=88=A0?=
=?UTF-8?q?=E6=94=B9=E6=9F=A5=E7=9A=84=E7=A4=BA=E4=BE=8B=E4=B8=AD=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E6=9B=B4=E6=94=B9=E4=B8=BAswitch=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
增删改查的示例中状态更改为switch组件
closed #I9QEFC
---
src/components/CURD/PageModal.vue | 18 +++++++++++++++++-
src/components/CURD/types.ts | 1 +
src/views/demo/curd/config/add.ts | 22 +++++++++++++++++-----
src/views/demo/curd/config/edit.ts | 24 ++++++++++++++++++------
4 files changed, 53 insertions(+), 12 deletions(-)
diff --git a/src/components/CURD/PageModal.vue b/src/components/CURD/PageModal.vue
index 3d53e394..37854c11 100644
--- a/src/components/CURD/PageModal.vue
+++ b/src/components/CURD/PageModal.vue
@@ -66,6 +66,14 @@
+
+
+
+
+
+
+
+
func());
// 获取表单数据
function getFormData(key?: string) {
- return key === undefined ? formData : formData[key] ?? undefined;
+ return key === undefined ? formData : (formData[key] ?? undefined);
}
// 设置表单值
diff --git a/src/components/CURD/types.ts b/src/components/CURD/types.ts
index 97f4d834..229dc0bb 100644
--- a/src/components/CURD/types.ts
+++ b/src/components/CURD/types.ts
@@ -220,6 +220,7 @@ export type IFormItems = Array<{
| "input"
| "select"
| "radio"
+ | "switch"
| "checkbox"
| "tree-select"
| "date-picker"
diff --git a/src/views/demo/curd/config/add.ts b/src/views/demo/curd/config/add.ts
index 023548c4..38bcf59d 100644
--- a/src/views/demo/curd/config/add.ts
+++ b/src/views/demo/curd/config/add.ts
@@ -103,14 +103,26 @@ const modalConfig: IModalConfig = {
maxlength: 50,
},
},
+ // {
+ // label: "状态",
+ // prop: "status",
+ // type: "radio",
+ // options: [
+ // { label: "正常", value: 1 },
+ // { label: "禁用", value: 0 },
+ // ],
+ // initialValue: 1,
+ // },
{
label: "状态",
prop: "status",
- type: "radio",
- options: [
- { label: "正常", value: 1 },
- { label: "禁用", value: 0 },
- ],
+ type: "switch",
+ attrs: {
+ activeText: "正常",
+ inactiveText: "禁用",
+ activeValue: 1,
+ inactiveValue: 0,
+ },
initialValue: 1,
},
],
diff --git a/src/views/demo/curd/config/edit.ts b/src/views/demo/curd/config/edit.ts
index 983546a4..bbcf2cb1 100644
--- a/src/views/demo/curd/config/edit.ts
+++ b/src/views/demo/curd/config/edit.ts
@@ -107,14 +107,26 @@ const modalConfig: IModalConfig = {
maxlength: 50,
},
},
+ // {
+ // label: "状态",
+ // prop: "status",
+ // type: "radio",
+ // options: [
+ // { label: "正常", value: 1 },
+ // { label: "禁用", value: 0 },
+ // ],
+ // initialValue: 1,
+ // },
{
- label: "状态",
+ label: "状态123",
prop: "status",
- type: "radio",
- options: [
- { label: "正常", value: 1 },
- { label: "禁用", value: 0 },
- ],
+ type: "switch",
+ attrs: {
+ activeText: "正常",
+ inactiveText: "禁用",
+ activeValue: 1,
+ inactiveValue: 0,
+ },
},
],
};
From 98b48e4bad83b0020e5e0ad6ed08e3b0fda1012f Mon Sep 17 00:00:00 2001
From: Theo <971366405@qq.com>
Date: Fri, 2 Aug 2024 23:52:16 +0800
Subject: [PATCH 3/3] =?UTF-8?q?style:=20:lipstick:=20=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E7=8A=B6=E6=80=81=E6=9B=B4=E6=94=B9?=
=?UTF-8?q?=E4=B8=BAswitch=EF=BC=8C=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
用户管理的状态更改为switch,列表优化
---
src/views/system/user/index.vue | 37 +++++++++++++++++++--------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index e70856b0..3c18c37e 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -28,13 +28,14 @@
clearable
class="!w-[100px]"
>
-
-
+
+
-
+
@@ -140,10 +136,15 @@
width="120"
/>
-
+
- {{ scope.row.status == 1 ? "启用" : "禁用" }}
+ {{ scope.row.status == 1 ? "正常" : "禁用" }}
@@ -268,10 +269,14 @@
-
- 正常
- 禁用
-
+