From 74da10ca29b0c1de28e271ec48b5a738499bfd96 Mon Sep 17 00:00:00 2001 From: Pan Date: Fri, 26 Apr 2019 17:58:55 +0800 Subject: [PATCH 1/4] chore: set ci node version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 16574d9..f4be7a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js -node_js: stable +node_js: 10 script: npm run test notifications: email: false From 16d39eb0154102915c39afc1ddcffe4d717c5e0a Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 28 Apr 2019 17:57:29 +0800 Subject: [PATCH 2/4] fix[Mock]: add error handling --- mock/mock-server.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mock/mock-server.js b/mock/mock-server.js index ccce04d..4c4cb2a 100644 --- a/mock/mock-server.js +++ b/mock/mock-server.js @@ -48,17 +48,21 @@ module.exports = app => { ignoreInitial: true }).on('all', (event, path) => { if (event === 'change' || event === 'add') { - // remove mock routes stack - app._router.stack.splice(mockStartIndex, mockRoutesLength) + try { + // remove mock routes stack + app._router.stack.splice(mockStartIndex, mockRoutesLength) - // clear routes cache - unregisterRoutes() + // clear routes cache + unregisterRoutes() - const mockRoutes = registerRoutes(app) - mockRoutesLength = mockRoutes.mockRoutesLength - mockStartIndex = mockRoutes.mockStartIndex + const mockRoutes = registerRoutes(app) + mockRoutesLength = mockRoutes.mockRoutesLength + mockStartIndex = mockRoutes.mockStartIndex - console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`)) + console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`)) + } catch (error) { + console.log(chalk.redBright(error)) + } } }) } From d482e0bb9f42c215d6ab531afefbeec3c473ec1e Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 15:07:18 +0800 Subject: [PATCH 3/4] docs: tips for set port --- vue.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vue.config.js b/vue.config.js index be1b518..4ad716c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,6 +7,9 @@ function resolve(dir) { } const name = defaultSettings.title || 'vue Admin Template' // page title +// If your port is set to 80, +// use administrator privileges to execute the command line. +// For example, Mac: sudo npm run const port = 9528 // dev port // All configuration item explanations can be find in https://cli.vuejs.org/config/ From 896962a5c57801f2843754bb171d9a0b4bff62c7 Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 15:55:25 +0800 Subject: [PATCH 4/4] perf: optimize page scrolling when setting fixedHeader --- src/layout/components/AppMain.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index e01ec98..178d579 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -27,5 +27,7 @@ export default { } .fixed-header+.app-main { padding-top: 50px; + height: 100vh; + overflow: auto; }