Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
Former-commit-id: 246699c417f5b48e853ab14bf6c5db78462910ae [formerly 5a6baba]
Former-commit-id: fcac428
  • Loading branch information
FairyEver committed Sep 12, 2018
2 parents 2d0a260 + 03efb83 commit 096a4f6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-admin",
"version": "1.3.0",
"version": "1.4.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --open",
Expand Down Expand Up @@ -31,6 +31,7 @@
"lowdb": "^1.0.0",
"marked": "^0.3.9",
"mockjs": "^1.0.1-beta3",
"nprogress": "^0.2.0",
"papaparse": "^4.3.6",
"particles.js": "^2.0.0",
"quill": "^1.3.4",
Expand Down
8 changes: 8 additions & 0 deletions src/assets/style/fixed/n-progress.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#nprogress {
.bar {
background: $color-primary !important;
}
.peg {
box-shadow: 0 0 10px $color-primary, 0 0 5px $color-primary !important;
}
}
2 changes: 2 additions & 0 deletions src/assets/style/public-class.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
@import '~@/assets/style/fixed/element.scss';
// 补丁 markdown
@import '~@/assets/style/fixed/markdown.scss';
// 补丁 n-progress
@import '~@/assets/style/fixed/n-progress.scss';
// 补丁 vue-splitpane
@import '~@/assets/style/fixed/vue-splitpane.scss';
// 补丁 vue-grid-layout
Expand Down
8 changes: 8 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import Vue from 'vue'
import VueRouter from 'vue-router'

// 进度条
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'

import store from '@/store/index'

import util from '@/libs/util.js'
Expand All @@ -20,6 +24,8 @@ const router = new VueRouter({
* 权限验证
*/
router.beforeEach((to, from, next) => {
// 进度条
NProgress.start()
// 关闭搜索面板
store.commit('d2admin/search/set', false)
// 验证当前路由所有的匹配中是否需要有登录验证的
Expand All @@ -45,6 +51,8 @@ router.beforeEach((to, from, next) => {
})

router.afterEach(to => {
// 进度条
NProgress.done()
// 需要的信息
const app = router.app
const { name, params, query } = to
Expand Down

0 comments on commit 096a4f6

Please sign in to comment.