From 8295b75371305224d5b223ae2566c50efbb94749 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Thu, 1 Feb 2024 14:41:38 +0800
Subject: [PATCH 01/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9C?=
=?UTF-8?q?=E9=97=B4=E6=A8=A1=E5=BC=8F=E4=BC=9A=E7=99=BD=E5=B1=8F=E5=8A=A0?=
=?UTF-8?q?=E8=BD=BD=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/index.html b/index.html
index 16722a6..753eb82 100644
--- a/index.html
+++ b/index.html
@@ -19,6 +19,10 @@
line-height: 1.15;
}
+ html[data-theme='dark'] {
+ background-color: #2c344a;
+ }
+
html[data-theme='dark'] .app-loading {
background-color: #2c344a;
}
@@ -143,6 +147,17 @@
}
}
+
--
Gitee
From c6a052521ea6d833926ac5e1f96d68e98ee3e7a7 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Thu, 1 Feb 2024 14:56:08 +0800
Subject: [PATCH 02/13] =?UTF-8?q?chore:=20=E9=87=87=E7=94=A8skeleton?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/user/UserInfoModal.vue | 56 +++++++++++++------------
1 file changed, 29 insertions(+), 27 deletions(-)
diff --git a/src/views/system/user/UserInfoModal.vue b/src/views/system/user/UserInfoModal.vue
index 9b3b3ef..35eefb5 100644
--- a/src/views/system/user/UserInfoModal.vue
+++ b/src/views/system/user/UserInfoModal.vue
@@ -1,6 +1,7 @@
-
+
+
关闭
@@ -12,35 +13,36 @@
import { userInfo } from '@/api/system/user';
import { Description, useDescription } from '@/components/Description';
import { descSchema } from './user.info';
+ import { Skeleton } from 'ant-design-vue';
+ import { ref } from 'vue';
defineOptions({ name: 'UserInfoModal' });
- const [registerInnerModal, { modalLoading, closeModal }] = useModalInner(
- async (userId: string | number) => {
- modalLoading(true);
- if (!userId) {
- return closeModal();
- }
- const response = await userInfo(userId);
- // 外部的roleIds postIds才是真正对应的 新增时为空
- const { postIds = [], roleIds = [], user, roles, posts } = response;
-
- const postNames = posts
- .filter((item) => postIds.includes(item.postId))
- .map((item) => item.postName);
-
- const roleNames = roles
- .filter((item) => roleIds.includes(item.roleId))
- .map((item) => item.roleName);
-
- (user as any).postNames = postNames;
- (user as any).roleNames = roleNames;
-
- // 赋值
- setDescProps({ data: user });
- modalLoading(false);
- },
- );
+ const showSkeleton = ref(true);
+ const [registerInnerModal, { closeModal }] = useModalInner(async (userId: string | number) => {
+ showSkeleton.value = true;
+ if (!userId) {
+ return closeModal();
+ }
+ const response = await userInfo(userId);
+ // 外部的roleIds postIds才是真正对应的 新增时为空
+ const { postIds = [], roleIds = [], user, roles, posts } = response;
+
+ const postNames = posts
+ .filter((item) => postIds.includes(item.postId))
+ .map((item) => item.postName);
+
+ const roleNames = roles
+ .filter((item) => roleIds.includes(item.roleId))
+ .map((item) => item.roleName);
+
+ (user as any).postNames = postNames;
+ (user as any).roleNames = roleNames;
+
+ // 赋值
+ setDescProps({ data: user });
+ showSkeleton.value = false;
+ });
const [registerDescription, { setDescProps }] = useDescription({
column: 1,
--
Gitee
From f00ca48738746d11b7e46b173e113df5f7aacaf0 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Thu, 1 Feb 2024 15:18:44 +0800
Subject: [PATCH 03/13] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/user/index.vue | 49 +++++++++++++++++----------------
1 file changed, 25 insertions(+), 24 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 8f91035..591f4a2 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -2,22 +2,24 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -70,6 +72,7 @@
import { PageWrapper } from '@/components/Page';
- import { Row, Col, Space, Empty } from 'ant-design-vue';
+ import { Row, Col, Space, Empty, Skeleton } from 'ant-design-vue';
import { BasicTree } from '@/components/Tree/index';
import {
departmentTree,
@@ -169,16 +172,17 @@
// 缓存
defineOptions({ name: 'User' });
- type Data = {
+ interface TreeProps {
tree: DeptTreeData[];
selectDeptId: string[];
- };
+ }
/** 左边搜索框 */
const deptSearchText = ref('');
- const data: Data = reactive({
+ const data: TreeProps = reactive({
tree: [],
selectDeptId: [],
});
+ const showTreeSkeleton = ref(true);
// 选中部门后刷新表格
async function handleSelectDept() {
@@ -187,6 +191,7 @@
onMounted(async () => {
data.tree = await departmentTree();
+ showTreeSkeleton.value = false;
});
const [registerTable, { reload, selected, reloadWithCallback, multipleRemove }] = useTable({
@@ -279,10 +284,6 @@