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 @@