Skip to content

Commit 733afdd

Browse files
committed
perf(nprocess): remove nprocess css
1 parent b107b52 commit 733afdd

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

src/design/index.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ body {
5252
}
5353
}
5454

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-
6155
body {
6256
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';
6357
font-style: normal;

src/design/public.less

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,21 @@
2424
::-webkit-scrollbar-thumb:hover {
2525
background: @border-color-dark;
2626
}
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ import type { Router } from 'vue-router';
22

33
import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting';
44

5-
import NProgress from 'nprogress';
6-
import 'nprogress/nprogress.css';
5+
import nProgress from 'nprogress';
6+
77
import { unref } from 'vue';
88

99
const { getOpenNProgress } = useTransitionSetting();
1010

1111
export function createProgressGuard(router: Router) {
1212
router.beforeEach(async (to) => {
1313
if (to.meta.loaded) return true;
14-
unref(getOpenNProgress) && NProgress.start();
14+
unref(getOpenNProgress) && nProgress.start();
1515
return true;
1616
});
1717

1818
router.afterEach(async (to) => {
1919
if (to.meta.loaded) return true;
20-
unref(getOpenNProgress) && NProgress.done();
20+
unref(getOpenNProgress) && nProgress.done();
2121
return true;
2222
});
2323
}

0 commit comments

Comments
 (0)