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: 8b5e26e73635d05ba5b434361049fa95c64c093b [formerly 8b5e26e73635d05ba5b434361049fa95c64c093b [formerly 8b5e26e73635d05ba5b434361049fa95c64c093b [formerly 8b5e26e73635d05ba5b434361049fa95c64c093b [formerly be9a399 [formerly 20ad0f165fbffa16265ebae508143a598b3413d2]]]]]
Former-commit-id: fcac428
Former-commit-id: 096a4f6
Former-commit-id: 8ed814d291fad05e706ce7c3616376730854100a [formerly 0dfffa884dafae04e9dbadc64f43072cdae13fb1]
Former-commit-id: 5ab7ff7a264bea5009f314a1cdcf3bd38f87842b
Former-commit-id: ae511b4318de261f6bb938ec6dd433ed982d00f9
Former-commit-id: 622f33d707c04d9178e66919ee970995ce2708d6
Former-commit-id: 8ebf2cca72916b458f2eb1b2dda83ea54be2ae1c
Former-commit-id: 8c1635fc0e400a8149389b4f2e58da7b0e46b588
  • Loading branch information
FairyEver committed Sep 12, 2018
2 parents b11c9a5 + 77f8135 commit a297e2a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json.REMOVED.git-id

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 a297e2a

Please sign in to comment.