From 818b56565833a674e899c2ee9a4bbfac9b1b70d9 Mon Sep 17 00:00:00 2001
From: Pan
Date: Sun, 5 May 2019 16:13:57 +0800
Subject: [PATCH 01/35] 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 02/35] 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 @@
-
+
cancel
@@ -47,10 +53,22 @@
-
+
Ok
-
+
Edit
diff --git a/vue.config.js b/vue.config.js
index aeaeb0e4..dcb0c248 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -99,7 +99,7 @@ module.exports = {
.end()
config
- // https://webpack.js.org/configuration/devtool/#development
+ // https://webpack.js.org/configuration/devtool/#development
.when(process.env.NODE_ENV === 'development',
config => config.devtool('cheap-source-map')
)
From 6c8d7a164f00aacaf7d517025f9ba3000d676004 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Tue, 7 May 2019 14:08:28 +0800
Subject: [PATCH 03/35] perf[Profile]: adapt the profile page to the mobile
(#2020)
---
src/views/profile/components/UserCard.vue | 2 +-
src/views/profile/index.vue | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/profile/components/UserCard.vue b/src/views/profile/components/UserCard.vue
index a8d27513..c2ce1aa8 100644
--- a/src/views/profile/components/UserCard.vue
+++ b/src/views/profile/components/UserCard.vue
@@ -1,5 +1,5 @@
-
+
About me
diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue
index 8069a95c..87e4f94f 100644
--- a/src/views/profile/index.vue
+++ b/src/views/profile/index.vue
@@ -3,11 +3,11 @@
-
+
-
+
From ad689e3f96e06820866fbe860c75d81643bf780f Mon Sep 17 00:00:00 2001
From: Pan
Date: Wed, 8 May 2019 18:10:41 +0800
Subject: [PATCH 04/35] perf[Style]: refine fixed-header style when open
el-dialog
---
src/layout/components/AppMain.vue | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue
index e72e4555..92ca2c88 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -49,3 +49,11 @@ export default {
}
+
From 63f86355382432cf7cb0181d2fe31abc7ff70782 Mon Sep 17 00:00:00 2001
From: Pan
Date: Thu, 9 May 2019 12:47:01 +0800
Subject: [PATCH 05/35] doc: add new article
---
README.zh-CN.md | 1 +
src/components/Share/DropdownMenu.vue | 2 +-
src/views/components-demo/mixin.vue | 1 +
src/views/documentation/index.vue | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.zh-CN.md b/README.zh-CN.md
index a92e180d..c6f4604d 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -68,6 +68,7 @@
- [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac)
- [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35)
- [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板)](https://juejin.im/post/595b4d776fb9a06bbe7dba56)
+- [手摸手,带你用vue撸后台 系列五(v4.0新版本)](https://juejin.im/post/5c92ff94f265da6128275a85)
- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)
- [手摸手,带你优雅的使用 icon](https://juejin.im/post/59bb864b5188257e7a427c09)
- [手摸手,带你用合理的姿势使用 webpack4(上)](https://juejin.im/post/5b56909a518825195f499806)
diff --git a/src/components/Share/DropdownMenu.vue b/src/components/Share/DropdownMenu.vue
index ac29bde7..8ad8e56e 100644
--- a/src/components/Share/DropdownMenu.vue
+++ b/src/components/Share/DropdownMenu.vue
@@ -38,7 +38,7 @@ export default {
From cdf3ea06c7797cc1f4bf867d040bddfc3bc66568 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Mon, 20 May 2019 11:04:17 +0800
Subject: [PATCH 15/35] fix: fixed change roles bug (#2072)
---
src/store/modules/user.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index d2b2e67a..dbc29003 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -115,6 +115,9 @@ const actions = {
// dynamically add accessible routes
router.addRoutes(accessRoutes)
+ // reset visited views and cached views
+ dispatch('tagsView/delAllViews', null, { root: true })
+
resolve()
})
}
From fa23feeed4a7f589488ffde2a9f8d67bb95262e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Mon, 20 May 2019 11:04:51 +0800
Subject: [PATCH 16/35] perf[Breadcrumb]: do not update breadcrumbs when go to
redirect page (#2086)
---
src/components/Breadcrumb/index.vue | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue
index b89d8da6..c11fd448 100644
--- a/src/components/Breadcrumb/index.vue
+++ b/src/components/Breadcrumb/index.vue
@@ -21,7 +21,11 @@ export default {
}
},
watch: {
- $route() {
+ $route(route) {
+ // if you go to the redirect page, do not update the breadcrumbs
+ if (route.path.startsWith('/redirect/')) {
+ return
+ }
this.getBreadcrumb()
}
},
From c85ce21951cdcc1876015d303e455c0644682675 Mon Sep 17 00:00:00 2001
From: Yamel Senih
Date: Sun, 19 May 2019 23:10:30 -0400
Subject: [PATCH 17/35] perf[store]: add support to sub-modules (#2047)
---
src/store/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/store/index.js b/src/store/index.js
index 70736d3a..0fd83955 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -5,7 +5,7 @@ import getters from './getters'
Vue.use(Vuex)
// https://webpack.js.org/guides/dependency-management/#requirecontext
-const modulesFiles = require.context('./modules', false, /\.js$/)
+const modulesFiles = require.context('./modules', true, /\.js$/)
// you do not need `import app from './modules/app'`
// it will auto require all vuex module from modules file
From a582eec089c00e966741cc49590f81c1cd727fa2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Mon, 20 May 2019 11:21:07 +0800
Subject: [PATCH 18/35] perf[Login]: support other query (#2013)
---
src/views/login/index.vue | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 27f11ef5..7c16db67 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -116,13 +116,18 @@ export default {
capsTooltip: false,
loading: false,
showDialog: false,
- redirect: undefined
+ redirect: undefined,
+ otherQuery: {}
}
},
watch: {
$route: {
handler: function(route) {
- this.redirect = route.query && route.query.redirect
+ const query = route.query
+ if (query) {
+ this.redirect = query.redirect
+ this.otherQuery = this.getOtherQuery(query)
+ }
},
immediate: true
}
@@ -169,7 +174,7 @@ export default {
this.loading = true
this.$store.dispatch('user/login', this.loginForm)
.then(() => {
- this.$router.push({ path: this.redirect || '/' })
+ this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
this.loading = false
})
.catch(() => {
@@ -180,6 +185,14 @@ export default {
return false
}
})
+ },
+ getOtherQuery(query) {
+ return Object.keys(query).reduce((acc, cur) => {
+ if (cur !== 'redirect') {
+ acc[cur] = query[cur]
+ }
+ return acc
+ }, {})
}
// afterQRScan() {
// if (e.key === 'x-admin-oauth-code') {
From bd814772029dc98840642ea4b3aa17349a73ba1f Mon Sep 17 00:00:00 2001
From: Pan
Date: Mon, 20 May 2019 13:16:08 +0800
Subject: [PATCH 19/35] refactor[chore]: generate postcss.config.js instead of
.postcssrc.js
consistent with vue-cli
---
.postcssrc.js | 8 --------
package.json | 3 +--
postcss.config.js | 5 +++++
3 files changed, 6 insertions(+), 10 deletions(-)
delete mode 100644 .postcssrc.js
create mode 100644 postcss.config.js
diff --git a/.postcssrc.js b/.postcssrc.js
deleted file mode 100644
index 09948d63..00000000
--- a/.postcssrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// https://github.com/michael-ciniawsky/postcss-load-config
-
-module.exports = {
- "plugins": {
- // to edit target browsers: use "browserslist" field in package.json
- "autoprefixer": {}
- }
-}
diff --git a/package.json b/package.json
index 6802c9b5..0becf2b3 100644
--- a/package.json
+++ b/package.json
@@ -108,7 +108,6 @@
},
"browserslist": [
"> 1%",
- "last 2 versions",
- "not ie <= 8"
+ "last 2 versions"
]
}
diff --git a/postcss.config.js b/postcss.config.js
new file mode 100644
index 00000000..961986e2
--- /dev/null
+++ b/postcss.config.js
@@ -0,0 +1,5 @@
+module.exports = {
+ plugins: {
+ autoprefixer: {}
+ }
+}
From cf1f40ddadefd5b639e7f84f5d4494e5ada5e17e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Tue, 21 May 2019 10:50:10 +0800
Subject: [PATCH 20/35] perf[Tinymce]: dynamic import tinymce(#2102)
---
public/index.html | 4 ---
src/components/Tinymce/dynamicLoadScript.js | 39 +++++++++++++++++++++
src/components/Tinymce/index.vue | 20 +++++++++--
vue.config.js | 10 ------
4 files changed, 57 insertions(+), 16 deletions(-)
create mode 100644 src/components/Tinymce/dynamicLoadScript.js
diff --git a/public/index.html b/public/index.html
index 9bb2d7fc..e9185009 100644
--- a/public/index.html
+++ b/public/index.html
@@ -9,10 +9,6 @@
<%= webpackConfig.name %>
-
- <% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
-
- <% } %>
diff --git a/src/components/Tinymce/dynamicLoadScript.js b/src/components/Tinymce/dynamicLoadScript.js
new file mode 100644
index 00000000..46a93290
--- /dev/null
+++ b/src/components/Tinymce/dynamicLoadScript.js
@@ -0,0 +1,39 @@
+const dynamicLoadScript = (src, callback) => {
+ const existingScript = document.getElementById(src)
+ const cb = callback || function() {}
+
+ if (!existingScript) {
+ const script = document.createElement('script')
+ script.src = src // src url for the third-party library being loaded.
+ script.id = src
+ document.body.appendChild(script)
+
+ const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd
+ onEnd(script, cb)
+ }
+
+ if (existingScript && cb) cb(null, existingScript)
+
+ function stdOnEnd(script, cb) {
+ script.onload = function() {
+ // this.onload = null here is necessary
+ // because even IE9 works not like others
+ this.onerror = this.onload = null
+ cb(null, script)
+ }
+ script.onerror = function() {
+ this.onerror = this.onload = null
+ cb(new Error('Failed to load ' + src), script)
+ }
+ }
+
+ function ieOnEnd(script, cb) {
+ script.onreadystatechange = function() {
+ if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
+ this.onreadystatechange = null
+ cb(null, script) // there is no way to catch loading errors in IE8
+ }
+ }
+}
+
+export default dynamicLoadScript
diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue
index 08ef768d..670a0e53 100644
--- a/src/components/Tinymce/index.vue
+++ b/src/components/Tinymce/index.vue
@@ -15,6 +15,10 @@
import editorImage from './components/EditorImage'
import plugins from './plugins'
import toolbar from './toolbar'
+import load from './dynamicLoadScript'
+
+// why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one
+const tinymceCDN = 'https://cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js'
export default {
name: 'Tinymce',
@@ -91,10 +95,12 @@ export default {
}
},
mounted() {
- this.initTinymce()
+ this.init()
},
activated() {
- this.initTinymce()
+ if (window.tinymce) {
+ this.initTinymce()
+ }
},
deactivated() {
this.destroyTinymce()
@@ -103,6 +109,16 @@ export default {
this.destroyTinymce()
},
methods: {
+ init() {
+ // dynamic load tinymce from cdn
+ load(tinymceCDN, (err) => {
+ if (err) {
+ this.$message.error(err.message)
+ return
+ }
+ this.initTinymce()
+ })
+ },
initTinymce() {
const _this = this
window.tinymce.init({
diff --git a/vue.config.js b/vue.config.js
index 41a7f600..c5e31642 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -57,16 +57,6 @@ module.exports = {
}
},
chainWebpack(config) {
- const cdn = {
- // inject tinymce into index.html
- // why use this cdn, detail see https://github.com/PanJiaChen/tinymce-all-in-one
- js: ['https://cdn.jsdelivr.net/npm/tinymce-all-in-one@4.9.3/tinymce.min.js']
- }
- config.plugin('html')
- .tap(args => {
- args[0].cdn = cdn
- return args
- })
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
From 5b1b05b18e6c675b8106833c2d99e97cd8042ec8 Mon Sep 17 00:00:00 2001
From: Pan
Date: Tue, 21 May 2019 10:53:49 +0800
Subject: [PATCH 21/35] [release] 4.2.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 0becf2b3..10b0a6bd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-element-admin",
- "version": "4.0.1",
+ "version": "4.2.0",
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "Pan ",
"license": "MIT",
From 52f56ee55f5b21fcd75eff4fc6959368b5ed7da0 Mon Sep 17 00:00:00 2001
From: Pan
Date: Thu, 23 May 2019 10:18:50 +0800
Subject: [PATCH 22/35] perf[Style]: refine example css
---
src/views/example/components/ArticleDetail.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue
index 59d7fce1..692fffa3 100644
--- a/src/views/example/components/ArticleDetail.vue
+++ b/src/views/example/components/ArticleDetail.vue
@@ -48,7 +48,7 @@
:colors="['#99A9BF', '#F7BA2A', '#FF9900']"
:low-threshold="1"
:high-threshold="3"
- style="margin-top:8px;"
+ style="display:inline-block"
/>
From caf7614ab2786ff7d7a65428e261c6dc3d0954cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?=
Date: Thu, 23 May 2019 11:27:10 +0800
Subject: [PATCH 23/35] fix[Chart]: fixed chart bug in keep-alive (#2119)
---
.../dashboard/admin/components/BarChart.vue | 14 ++---
.../dashboard/admin/components/LineChart.vue | 39 +++----------
.../dashboard/admin/components/PieChart.vue | 14 ++---
.../admin/components/RaddarChart.vue | 14 ++---
.../admin/components/mixins/resize.js | 56 +++++++++++++++++++
5 files changed, 80 insertions(+), 57 deletions(-)
create mode 100644 src/views/dashboard/admin/components/mixins/resize.js
diff --git a/src/views/dashboard/admin/components/BarChart.vue b/src/views/dashboard/admin/components/BarChart.vue
index fa265ef6..be0af34f 100644
--- a/src/views/dashboard/admin/components/BarChart.vue
+++ b/src/views/dashboard/admin/components/BarChart.vue
@@ -5,11 +5,12 @@
From 921cdab858246778cf03a4fcbab889ae720ffd94 Mon Sep 17 00:00:00 2001
From: Jessynt
Date: Tue, 28 May 2019 16:18:25 +0800
Subject: [PATCH 34/35] docs: fix typo (#2170)
---
src/views/example/components/ArticleDetail.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue
index 692fffa3..3ab0daec 100644
--- a/src/views/example/components/ArticleDetail.vue
+++ b/src/views/example/components/ArticleDetail.vue
@@ -6,7 +6,7 @@
- Publush
+ Publish
Draft
@@ -35,7 +35,7 @@
-
+
From a9e21c2ce2574b57bd2bbf64c95dc433d37357f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=82=96=E6=95=8F?= <392716797@qq.com>
Date: Sun, 2 Jun 2019 16:08:23 +0800
Subject: [PATCH 35/35] fix: input attribute autocomplete error (#2191)
---
src/components/MDinput/index.vue | 12 ++++++------
src/views/login/index.vue | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/components/MDinput/index.vue b/src/components/MDinput/index.vue
index 013462fa..c59ea34a 100644
--- a/src/components/MDinput/index.vue
+++ b/src/components/MDinput/index.vue
@@ -9,7 +9,7 @@
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:required="required"
type="email"
class="material-input"
@@ -24,7 +24,7 @@
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:required="required"
type="url"
class="material-input"
@@ -40,7 +40,7 @@
:step="step"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:max="max"
:min="min"
:minlength="minlength"
@@ -59,7 +59,7 @@
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:max="max"
:min="min"
:required="required"
@@ -76,7 +76,7 @@
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:required="required"
type="tel"
class="material-input"
@@ -91,7 +91,7 @@
:placeholder="fillPlaceHolder"
:readonly="readonly"
:disabled="disabled"
- :autoComplete="autoComplete"
+ :autocomplete="autoComplete"
:minlength="minlength"
:maxlength="maxlength"
:required="required"
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 7c16db67..e21455ef 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -20,7 +20,7 @@
name="username"
type="text"
tabindex="1"
- auto-complete="on"
+ autocomplete="on"
/>
@@ -37,7 +37,7 @@
:placeholder="$t('login.password')"
name="password"
tabindex="2"
- auto-complete="on"
+ autocomplete="on"
@keyup.native="checkCapslock"
@blur="capsTooltip = false"
@keyup.enter.native="handleLogin"