From 12e62d117999080754d293e0dbcd97f768098ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E4=BA=BA=E8=87=AA=E6=9C=89=E5=A6=99=E8=AE=A1?= Date: Sat, 12 Mar 2022 18:22:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81=E5=8F=8A=E5=8D=87=E7=BA=A7?= =?UTF-8?q?ui=E7=89=88=E6=9C=AC=20:rocket:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/App.vue | 2 +- src/components/Modal/src/basicModal.vue | 2 +- src/components/Modal/src/hooks/useModal.ts | 1 - src/components/Modal/src/type/index.ts | 4 +- .../src/components/editable/EditableCell.vue | 178 +-- .../components/Header/ProjectSetting.vue | 1 + src/layout/components/Menu/index.vue | 284 ++--- src/layout/components/TagsView/index.vue | 1068 ++++++++--------- src/layout/index.vue | 373 +++--- src/settings/projectSetting.ts | 2 +- src/styles/common.less | 21 +- src/views/iframe/index.vue | 1 - src/views/system/menu/menu.vue | 2 +- yarn.lock | 35 +- 15 files changed, 989 insertions(+), 987 deletions(-) diff --git a/package.json b/package.json index 15c1b0c1..ae415fb0 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "lodash-es": "^4.17.21", "mitt": "^2.1.0", "mockjs": "^1.1.0", - "naive-ui": "^2.25.2", + "naive-ui": "^2.26.4", "pinia": "^2.0.11", "qs": "^6.10.3", "vfonts": "^0.1.0", diff --git a/src/App.vue b/src/App.vue index 34ec08ea..db690d2e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,7 +18,7 @@ diff --git a/src/layout/components/Header/ProjectSetting.vue b/src/layout/components/Header/ProjectSetting.vue index 22835f43..e6aaf7a8 100644 --- a/src/layout/components/Header/ProjectSetting.vue +++ b/src/layout/components/Header/ProjectSetting.vue @@ -359,6 +359,7 @@ margin: 0 5px 5px 0; text-align: center; line-height: 14px; + .n-icon { color: #fff; } diff --git a/src/layout/components/Menu/index.vue b/src/layout/components/Menu/index.vue index 3036c195..f2ac080f 100644 --- a/src/layout/components/Menu/index.vue +++ b/src/layout/components/Menu/index.vue @@ -15,153 +15,153 @@ diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 8fd85135..28dbf8ac 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -80,600 +80,600 @@ + /** + * @param value 要滚动到的位置 + * @param amplitude 每次滚动的长度 + */ + function scrollTo(value: number, amplitude: number) { + const currentScroll = navScroll.value.scrollLeft; + const scrollWidth = + (amplitude > 0 && currentScroll + amplitude >= value) || + (amplitude < 0 && currentScroll + amplitude <= value) + ? value + : currentScroll + amplitude; + navScroll.value && navScroll.value.scrollTo(scrollWidth, 0); + if (scrollWidth === value) return; + return window.requestAnimationFrame(() => scrollTo(value, amplitude)); + } - diff --git a/src/layout/index.vue b/src/layout/index.vue index 665c1fcd..5f96d5cb 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,7 +1,9 @@