From 725db2535ae7673c65dbecbe965f0dc4593d0ab7 Mon Sep 17 00:00:00 2001 From: TTiip <2711430287@qq.com> Date: Mon, 2 May 2022 19:07:53 +0800 Subject: [PATCH 1/7] chore: change .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2808db2..74cc4d8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* +yarn.lock node_modules dist From c4d43484d66a7a39b2f91c0b10dabdbfd455c9ab Mon Sep 17 00:00:00 2001 From: TTiip <2711430287@qq.com> Date: Mon, 2 May 2022 19:08:24 +0800 Subject: [PATCH 2/7] chore: change router type --- src/router/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 7da6db3..ba197a3 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,13 +1,13 @@ import type { App } from 'vue' -import { createRouter, createWebHashHistory } from 'vue-router' +import { createRouter, createWebHistory } from 'vue-router' import { basicRoutes, asyncRoutes } from './routes' import { setupRouterGuard } from './guard' import { setupDynamicRoutes } from './routes/plugins/dynamicRoutes' export const router = createRouter({ routes: [...basicRoutes, ...asyncRoutes], - history: createWebHashHistory(), + history: createWebHistory(), scrollBehavior: () => ({ left: 0, top: 0 }) }) From 1f66ac6242a322c8dd2459b54a7e2222a8fdf446 Mon Sep 17 00:00:00 2001 From: TTiip <2711430287@qq.com> Date: Mon, 2 May 2022 19:42:14 +0800 Subject: [PATCH 3/7] chore: change `netlify` add redirects config --- netlify.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netlify.toml b/netlify.toml index 1cc68fe..cbd094b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -6,3 +6,8 @@ [build] publish = "dist" command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 From 222f1c0ec874c2f38917d68037839b6a7bffaca0 Mon Sep 17 00:00:00 2001 From: TTiip <2711430287@qq.com> Date: Wed, 4 May 2022 01:41:04 +0800 Subject: [PATCH 4/7] feat: add `webkit-scrollbar` style init --- src/styles/variable.less | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/styles/variable.less b/src/styles/variable.less index 8d4aa49..d50a7dd 100644 --- a/src/styles/variable.less +++ b/src/styles/variable.less @@ -4,3 +4,19 @@ --sidebar-collapsed-width: 56px; --footer-height: 70px; } + +/*定义整个滚动条高宽及背景:高宽分别对应横竖滚动条的尺寸*/ +::-webkit-scrollbar { + width: 2px; + height: 2px; + background-color: #F5F5F5; +} +/*定义滚动条轨道:内阴影+圆角*/ +::-webkit-scrollbar-track { + background-color: #F5F5F5; +} +/*定义滑块:内阴影+圆角*/ +::-webkit-scrollbar-thumb { + border-radius: 2px; + background-color: #999; +} From 0e57e6990bc1eec9b75551186b6dfd3ce72c0add Mon Sep 17 00:00:00 2001 From: TTiip <2711430287@qq.com> Date: Wed, 4 May 2022 01:42:26 +0800 Subject: [PATCH 5/7] fix(menu-list): menu-list can't scroll --- .../default/sidebar/components/Menu.vue | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/src/layouts/default/sidebar/components/Menu.vue b/src/layouts/default/sidebar/components/Menu.vue index 8c24389..94639c2 100644 --- a/src/layouts/default/sidebar/components/Menu.vue +++ b/src/layouts/default/sidebar/components/Menu.vue @@ -1,23 +1,26 @@ + + From d4adcf28ef7e793c875f27739b6f060080045b8b Mon Sep 17 00:00:00 2001 From: TTIip <2711430287@qq.com> Date: Wed, 4 May 2022 14:28:35 +0800 Subject: [PATCH 6/7] fix: menu-list scroll-bar dispaly change --- src/layouts/default/sidebar/components/Menu.vue | 16 ++++++++++++++++ src/styles/variable.less | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/layouts/default/sidebar/components/Menu.vue b/src/layouts/default/sidebar/components/Menu.vue index 94639c2..af0b3e2 100644 --- a/src/layouts/default/sidebar/components/Menu.vue +++ b/src/layouts/default/sidebar/components/Menu.vue @@ -86,4 +86,20 @@ const getMenuClass = computed(() => { overflow-y: auto; } } + + /*定义整个滚动条高宽及背景:高宽分别对应横竖滚动条的尺寸*/ + :deep(::-webkit-scrollbar) { + width: 2px; + height: 2px; + background-color: #F5F5F5; + } + /*定义滚动条轨道:内阴影+圆角*/ + :deep(::-webkit-scrollbar-track) { + background-color: #F5F5F5; + } + /*定义滑块:内阴影+圆角*/ + :deep(::-webkit-scrollbar-thumb) { + border-radius: 2px; + background-color: rgb(119, 119, 119); + } diff --git a/src/styles/variable.less b/src/styles/variable.less index d50a7dd..8d4aa49 100644 --- a/src/styles/variable.less +++ b/src/styles/variable.less @@ -4,19 +4,3 @@ --sidebar-collapsed-width: 56px; --footer-height: 70px; } - -/*定义整个滚动条高宽及背景:高宽分别对应横竖滚动条的尺寸*/ -::-webkit-scrollbar { - width: 2px; - height: 2px; - background-color: #F5F5F5; -} -/*定义滚动条轨道:内阴影+圆角*/ -::-webkit-scrollbar-track { - background-color: #F5F5F5; -} -/*定义滑块:内阴影+圆角*/ -::-webkit-scrollbar-thumb { - border-radius: 2px; - background-color: #999; -} From d0e5502c8ccd19a9f770edf54d317ac4c32827d4 Mon Sep 17 00:00:00 2001 From: TTIip <2711430287@qq.com> Date: Wed, 4 May 2022 14:29:15 +0800 Subject: [PATCH 7/7] chore: change .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 74cc4d8..2808db2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* -yarn.lock node_modules dist