From 41318aa0d932847b835f4274182eff62e7ed21f2 Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 15:02:27 +0800 Subject: [PATCH 1/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 30d40ea6..aeaeb0e4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,6 +7,9 @@ function resolve(dir) { } const name = defaultSettings.title || 'vue Element Admin' // 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 = 9527 // dev port // All configuration item explanations can be find in https://cli.vuejs.org/config/ From e8e6c7e79c2488779090f00efc5f1bbfcb04bd5b Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 15:49:56 +0800 Subject: [PATCH 2/4] perf: optimize page scrolling when setting fixedHeader tweak --- 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 62e6ace5..e72e4555 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -33,6 +33,8 @@ export default { .fixed-header+.app-main { padding-top: 50px; + height: 100vh; + overflow: auto; } .hasTagsView { From 818b56565833a674e899c2ee9a4bbfac9b1b70d9 Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 16:13:57 +0800 Subject: [PATCH 3/4] update doc --- README.ja.md | 6 +++--- README.md | 4 ++-- README.zh-CN.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.ja.md b/README.ja.md index e601291a..59aca3aa 100644 --- a/README.ja.md +++ b/README.ja.md @@ -26,7 +26,7 @@

-日本語 | [English](./README.md) | [简体中文](./README.zh-CN.md) +日本語 | [English](./README.md) | [简体中文](./README.zh-CN.md) ## 概要 @@ -135,7 +135,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s ```bash # clone the project -git clone https://github.com/PanJiaChen/vue-element-admin.git +git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git # enter the project directory cd vue-element-admin @@ -207,4 +207,4 @@ Modern browsers and Internet Explorer 10+. [MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) -Copyright (c) 2017-present PanJiaChen \ No newline at end of file +Copyright (c) 2017-present PanJiaChen diff --git a/README.md b/README.md index 0388b0d0..8615d916 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@

-English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) +English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) ## Introduction @@ -139,7 +139,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s ```bash # clone the project -git clone https://github.com/PanJiaChen/vue-element-admin.git +git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git # enter the project directory cd vue-element-admin diff --git a/README.zh-CN.md b/README.zh-CN.md index 0af0838d..d8ae1a9c 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -153,7 +153,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s ```bash # 克隆项目 -git clone https://github.com/PanJiaChen/vue-element-admin.git +git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git # 进入项目目录 cd vue-element-admin From 6346ab3d80e4d2b4e819b6031ae0589d9d797334 Mon Sep 17 00:00:00 2001 From: Pan Date: Sun, 5 May 2019 17:16:14 +0800 Subject: [PATCH 4/4] merge master --- README.ja.md | 2 ++ README.md | 4 +++- README.zh-CN.md | 4 +++- src/icons/index.js | 2 +- src/store/modules/user.js | 2 +- src/utils/index.js | 2 +- src/utils/open-window.js | 2 +- src/utils/request.js | 9 +++++---- src/utils/validate.js | 2 +- src/views/profile/index.vue | 2 -- src/views/table/inline-edit-table.vue | 24 +++++++++++++++++++++--- vue.config.js | 2 +- 12 files changed, 40 insertions(+), 17 deletions(-) diff --git a/README.ja.md b/README.ja.md index 59aca3aa..c99108fe 100644 --- a/README.ja.md +++ b/README.ja.md @@ -46,6 +46,8 @@ - デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) - Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) +**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update** + **現在のバージョン `v4.0+` は `vue-cli` で構築,バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。`vue-cli`に依存しないです。** **低いバージョンのブラウザはサーポートしないです(例えば ie),必要があれば polyfill を追加してください。 [詳細はこちら](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)** diff --git a/README.md b/README.md index 8615d916..a2c63a00 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,9 @@ It is a magical vue admin based on the newest development stack of vue, built-in - Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) - Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour)) -**The current version is `v4.0+` build on `vue-cli`. If you find a problem, please put [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), it does not rely on `vue-cli'** +**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update** + +**The current version is `v4.0+` build on `vue-cli`. If you find a problem, please put [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), it does not rely on `vue-cli`** **This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.** diff --git a/README.zh-CN.md b/README.zh-CN.md index d8ae1a9c..a92e180d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -50,10 +50,12 @@ - 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) - Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) -**目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0),它不依赖 `vue-cli`** +**`v4.1.0+`版本之后默认 master 分支将不支持国际化,有需要的请使用[i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)分支,它会和 master 保持同步更新** **该项目不支持低版本浏览器(如 ie),有需求请自行添加 polyfill [详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)** +**目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0),它不依赖 `vue-cli`** + 群主 **[圈子](https://jianshiapp.com/circles/1209)** 群主会经常分享一些技术相关的东西,或者加入 [qq 群](https://github.com/PanJiaChen/vue-element-admin/issues/602) 或者关注 [微博](https://weibo.com/u/3423485724?is_all=1) ## 前序准备 diff --git a/src/icons/index.js b/src/icons/index.js index c1c2e792..2c6b309c 100644 --- a/src/icons/index.js +++ b/src/icons/index.js @@ -1,5 +1,5 @@ import Vue from 'vue' -import SvgIcon from '@/components/SvgIcon'// svg组件 +import SvgIcon from '@/components/SvgIcon'// svg component // register globally Vue.component('svg-icon', SvgIcon) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f27615b0..d2b2e67a 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -97,7 +97,7 @@ const actions = { }) }, - // Dynamically modify permissions + // dynamically modify permissions changeRoles({ commit, dispatch }, role) { return new Promise(async resolve => { const token = role + '-token' diff --git a/src/utils/index.js b/src/utils/index.js index c0ee5026..ffb55260 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,5 +1,5 @@ /** - * Created by jiachenpan on 16/11/18. + * Created by PanJiaChen on 16/11/18. */ /** diff --git a/src/utils/open-window.js b/src/utils/open-window.js index 657bd190..1a655d77 100644 --- a/src/utils/open-window.js +++ b/src/utils/open-window.js @@ -1,5 +1,5 @@ /** - *Created by jiachenpan on 16/11/29. + *Created by PanJiaChen on 16/11/29. * @param {Sting} url * @param {Sting} title * @param {Number} w diff --git a/src/utils/request.js b/src/utils/request.js index d3c25c00..bc346a8c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -16,8 +16,9 @@ service.interceptors.request.use( // do something before request is sent if (store.getters.token) { - // let each request carry token --['X-Token'] as a custom key. - // please modify it according to the actual situation. + // let each request carry token + // ['X-Token'] is a custom headers key + // please modify it according to the actual situation config.headers['X-Token'] = getToken() } return config @@ -32,14 +33,14 @@ service.interceptors.request.use( // response interceptor service.interceptors.response.use( /** - * If you want to get information such as headers or status + * If you want to get http information such as headers or status * Please return response => response */ /** * Determine the request status by custom code * Here is just an example - * You can also judge the status by HTTP Status Code. + * You can also judge the status by HTTP Status Code */ response => { const res = response.data diff --git a/src/utils/validate.js b/src/utils/validate.js index e81672bb..6b3ac418 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -1,5 +1,5 @@ /** - * Created by jiachenpan on 16/11/18. + * Created by PanJiaChen on 16/11/18. */ /** diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue index e54bc718..8069a95c 100644 --- a/src/views/profile/index.vue +++ b/src/views/profile/index.vue @@ -9,7 +9,6 @@ - @@ -21,7 +20,6 @@ - diff --git a/src/views/table/inline-edit-table.vue b/src/views/table/inline-edit-table.vue index f739a144..63828145 100644 --- a/src/views/table/inline-edit-table.vue +++ b/src/views/table/inline-edit-table.vue @@ -37,7 +37,13 @@