Commit 733afddd19523550d8c7df5c523a0b0929afc608
1 parent
b107b528
perf(nprocess): remove nprocess css
Showing
3 changed files
with
22 additions
and
10 deletions
src/design/index.less
... | ... | @@ -52,12 +52,6 @@ body { |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | -// remove the clear button of a text input control in IE10+ | |
56 | -input::-ms-clear, | |
57 | -input::-ms-reveal { | |
58 | - display: none; | |
59 | -} | |
60 | - | |
61 | 55 | body { |
62 | 56 | font-family: 'BlinkMacSystemFont,segoe ui,Microsoft YaHei,Arial,sans-serif,Helvetica Neue,Helvetica,Pingfang SC,Hiragino Sans GB,Roboto,helvetica neue,Arial,noto sans,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol,noto color emoji'; |
63 | 57 | font-style: normal; | ... | ... |
src/design/public.less
... | ... | @@ -24,3 +24,21 @@ |
24 | 24 | ::-webkit-scrollbar-thumb:hover { |
25 | 25 | background: @border-color-dark; |
26 | 26 | } |
27 | + | |
28 | +// ================================= | |
29 | +// ==============nprogress========== | |
30 | +// ================================= | |
31 | +#nprogress { | |
32 | + pointer-events: none; | |
33 | + | |
34 | + .bar { | |
35 | + position: fixed; | |
36 | + top: 0; | |
37 | + left: 0; | |
38 | + z-index: 99999; | |
39 | + width: 100%; | |
40 | + height: 2px; | |
41 | + background-color: @primary-color; | |
42 | + opacity: 0.75; | |
43 | + } | |
44 | +} | ... | ... |
src/router/guard/progressGuard.ts
... | ... | @@ -2,8 +2,8 @@ import type { Router } from 'vue-router'; |
2 | 2 | |
3 | 3 | import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'; |
4 | 4 | |
5 | -import NProgress from 'nprogress'; | |
6 | -import 'nprogress/nprogress.css'; | |
5 | +import nProgress from 'nprogress'; | |
6 | + | |
7 | 7 | import { unref } from 'vue'; |
8 | 8 | |
9 | 9 | const { getOpenNProgress } = useTransitionSetting(); |
... | ... | @@ -11,13 +11,13 @@ const { getOpenNProgress } = useTransitionSetting(); |
11 | 11 | export function createProgressGuard(router: Router) { |
12 | 12 | router.beforeEach(async (to) => { |
13 | 13 | if (to.meta.loaded) return true; |
14 | - unref(getOpenNProgress) && NProgress.start(); | |
14 | + unref(getOpenNProgress) && nProgress.start(); | |
15 | 15 | return true; |
16 | 16 | }); |
17 | 17 | |
18 | 18 | router.afterEach(async (to) => { |
19 | 19 | if (to.meta.loaded) return true; |
20 | - unref(getOpenNProgress) && NProgress.done(); | |
20 | + unref(getOpenNProgress) && nProgress.done(); | |
21 | 21 | return true; |
22 | 22 | }); |
23 | 23 | } | ... | ... |