From 395db813b5639d76b3158202a3abaea3550201a1 Mon Sep 17 00:00:00 2001 From: bleachtred Date: Mon, 25 Sep 2023 15:29:32 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix=20=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?,=E9=9A=90=E8=97=8F=E6=96=B0=E6=97=A7=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=98=8E=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index cb448f5..fdcafc2 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -136,7 +136,7 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => { headers: { isEncrypt: true }, - params: data + data: data }); }; From 99a6b562335da60795f61b7c29f5414b3bfd3469 Mon Sep 17 00:00:00 2001 From: "DESKTOP-IGCH756\\PC" <921509429@qq.com> Date: Thu, 28 Sep 2023 14:58:34 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=88=97=E7=9A=84=E6=98=BE=E7=A4=BA=E4=B8=8E=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RightToolbar/index.vue | 53 +++++++++++++++------------ src/types/global.d.ts | 1 + src/views/system/user/index.vue | 14 +++---- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index 09036b7..0f4219f 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -7,13 +7,23 @@ - - + + +
显示/隐藏列
+ + +
- - - @@ -29,15 +39,9 @@ const props = defineProps({ gutter: propTypes.number.def(10), }) +const columnRef = ref(); const emits = defineEmits(['update:showSearch', 'queryTable']); -// 显隐数据 -const value = ref>([]); -// 弹出层标题 -const title = ref("显示/隐藏"); -// 是否显示弹出层 -const open = ref(false); - const style = computed(() => { const ret: any = {}; if (props.gutter) { @@ -56,23 +60,19 @@ function refresh() { emits("queryTable"); } -// 右侧列表元素变化 -function dataChange(data: TransferKey[]) { - props.columns?.forEach((item) => { - item.visible = !data.includes(item.key); - }) -} - -// 打开显隐列dialog -const showColumn = () => { - open.value = true; +// 更改数据列的显示和隐藏 +function columnChange(...args: any[]) { + props.columns?.forEach((item) => { + item.visible = args[1].checkedKeys.includes(item.key); + }) } // 显隐列初始默认隐藏列 onMounted(() => { props.columns?.forEach((item) => { - if (!item.visible) { - value.value.push(item.key); + if (item.visible) { + columnRef.value?.setChecked(item.key, true, false); + // value.value.push(item.key); } }) }) @@ -91,4 +91,9 @@ onMounted(() => { .my-el-transfer { text-align: center; } +.tree-header{ + width: 100%; + line-height: 24px; + text-align: center; +} diff --git a/src/types/global.d.ts b/src/types/global.d.ts index b9bc5f4..130f855 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -13,6 +13,7 @@ declare global { key: number; label: string; visible: boolean; + children: Array; } /** diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 9a6d82c..284d941 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -340,13 +340,13 @@ const upload = reactive({ }) // 列显隐信息 const columns = ref([ - { key: 0, label: `用户编号`, visible: false }, - { key: 1, label: `用户名称`, visible: true }, - { key: 2, label: `用户昵称`, visible: true }, - { key: 3, label: `部门`, visible: true }, - { key: 4, label: `手机号码`, visible: true }, - { key: 5, label: `状态`, visible: true }, - { key: 6, label: `创建时间`, visible: true } + { key: 0, label: `用户编号`, visible: false,children: [] }, + { key: 1, label: `用户名称`, visible: true,children: [] }, + { key: 2, label: `用户昵称`, visible: true,children: [] }, + { key: 3, label: `部门`, visible: true,children: [] }, + { key: 4, label: `手机号码`, visible: true,children: [] }, + { key: 5, label: `状态`, visible: true,children: [] }, + { key: 6, label: `创建时间`, visible: true,children: [] } ]) From fe384a3020fd2080d843704537b77954a8d82707 Mon Sep 17 00:00:00 2001 From: ahao Date: Fri, 29 Sep 2023 00:06:57 +0800 Subject: [PATCH 03/12] fix #I8550V https://gitee.com/dromara/RuoYi-Vue-Plus/issues/I8550V --- src/assets/styles/sidebar.scss | 19 ------------------- src/layout/components/Sidebar/SidebarItem.vue | 13 ++++++++----- src/layout/components/Sidebar/index.vue | 5 +++-- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index e695bc6..d47a2bd 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -227,23 +227,4 @@ margin-right: 16px; } } - - // the scroll bar appears when the sub-menu is too long - > .el-menu--popup { - max-height: 100vh; - overflow-y: auto; - - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } - } } diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index f803f13..204b19b 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -1,6 +1,6 @@