From 79ff7c0462a80c90f2e4533d3683fd783ab1d219 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Fri, 19 May 2023 10:49:37 +0800 Subject: [PATCH 01/12] chore: update --- README.md | 4 ---- src/views/about/columns.tsx | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d8227b6ae..a9d9d448e 100644 --- a/README.md +++ b/README.md @@ -146,10 +146,6 @@ pnpm build -## `QQ` 交流群 - -[点击去加入](https://yiming_chang.gitee.io/pure-admin-doc/pages/support/#qq-%E4%BA%A4%E6%B5%81%E7%BE%A4) - ## 许可证 原则上不收取任何费用及版权,可以放心使用,不过如需二次开源(比如用此平台二次开发并开源)请联系作者获取许可! diff --git a/src/views/about/columns.tsx b/src/views/about/columns.tsx index 897c666df..ec201b335 100644 --- a/src/views/about/columns.tsx +++ b/src/views/about/columns.tsx @@ -54,14 +54,14 @@ export function useColumns() { } }, { - label: "QQ交流群", + label: "精简版", cellRenderer: () => { return ( - 点击加群 + 精简版 ); } From 1f21a2d36498d3bff3b85e3fc19671d907faaef6 Mon Sep 17 00:00:00 2001 From: Netfan Date: Fri, 19 May 2023 16:30:05 +0800 Subject: [PATCH 02/12] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96PureTableBar?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8Ctitle=E5=8F=AF=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=8F=92=E6=A7=BD=20(#560)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 优化PureTableBar组件,title可使用插槽 --- src/components/RePureTableBar/src/bar.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/RePureTableBar/src/bar.tsx b/src/components/RePureTableBar/src/bar.tsx index 8d79d605f..30aa6d3b2 100644 --- a/src/components/RePureTableBar/src/bar.tsx +++ b/src/components/RePureTableBar/src/bar.tsx @@ -200,9 +200,13 @@ export default defineComponent({ return () => ( <> -
+
-

{props.title}

+ {slots?.title ? ( + slots.title() + ) : ( +

{props.title}

+ )}
{slots?.buttons ? (
{slots.buttons()}
From 9b57e687a86ac72bbdea95137af455aaf9ed73f7 Mon Sep 17 00:00:00 2001 From: Netfan Date: Fri, 19 May 2023 17:47:04 +0800 Subject: [PATCH 03/12] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=90=9C=E7=B4=A2=E5=BC=B9=E7=AA=97=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=20(#559)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 优化菜单搜索弹窗高度 * chore: 优化键盘`up`、`down`事件 --- .../search/components/SearchModal.vue | 2 +- .../search/components/SearchResult.vue | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/layout/components/search/components/SearchModal.vue b/src/layout/components/search/components/SearchModal.vue index 33b5ebba0..f37838181 100644 --- a/src/layout/components/search/components/SearchModal.vue +++ b/src/layout/components/search/components/SearchModal.vue @@ -164,7 +164,7 @@ onKeyStroke("ArrowDown", handleDown);
- + import { useI18n } from "vue-i18n"; -import { computed, getCurrentInstance } from "vue"; +import { useResizeObserver } from "@vueuse/core"; import { useEpThemeStoreHook } from "@/store/modules/epTheme"; import { useRenderIcon } from "@/components/ReIcon/src/hooks"; +import { ref, computed, getCurrentInstance, onMounted } from "vue"; import enterOutlined from "@/assets/svg/enter_outlined.svg?component"; import Bookmark2Line from "@iconify-icons/ri/bookmark-2-line"; @@ -26,6 +27,8 @@ interface Emits { (e: "enter"): void; } +const resultRef = ref(); +const innerHeight = ref(); const props = withDefaults(defineProps(), {}); const emit = defineEmits(); const instance = getCurrentInstance()!; @@ -59,19 +62,32 @@ function handleTo() { emit("enter"); } +function resizeResult() { + // el-scrollbar max-height="calc(90vh - 140px)" + innerHeight.value = window.innerHeight - window.innerHeight / 10 - 140; +} + +useResizeObserver(resultRef, () => { + resizeResult(); +}); + function handleScroll(index: number) { const curInstance = instance?.proxy?.$refs[`resultItemRef${index}`]; if (!curInstance) return 0; const curRef = curInstance[0] as ElRef; const scrollTop = curRef.offsetTop + 128; // 128 两个result-item(56px+56px=112px)高度加上下margin(8px+8px=16px) - return scrollTop > 600 ? scrollTop - 600 : 0; // 600 el-scrollbar max-height="600px" + return scrollTop > innerHeight.value ? scrollTop - innerHeight.value : 0; } +onMounted(() => { + resizeResult(); +}); + defineExpose({ handleScroll });