diff --git a/README.md b/README.md
index ed083293..d0ff7d74 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,11 @@ Understanding and learning this knowledge in advance will greatly help the use o
+## Sponsors
+Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
+
+
Admin Dashboard Templates made with Vue, React and Angular.
+
## Features
```
@@ -118,6 +123,7 @@ Understanding and learning this knowledge in advance will greatly help the use o
- Avatar Upload
- Back To Top
- Drag Dialog
+ - Drag Select
- Drag Kanban
- Drag List
- SplitPane
@@ -198,6 +204,14 @@ If you find this project useful, you can buy author a glass of juice :tropical_d
[Buy me a coffee](https://www.buymeacoffee.com/Pan)
+## Browsers support
+
+Modern browsers and Internet Explorer 10+.
+
+| [
](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
+| --------- | --------- | --------- | --------- |
+| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+
## License
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
diff --git a/README.zh-CN.md b/README.zh-CN.md
index ccd136e7..55882115 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -81,6 +81,11 @@
+## Sponsors
+Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
+
+
Admin Dashboard Templates made with Vue, React and Angular.
+
## 功能
```
@@ -130,6 +135,7 @@
- 头像上传
- 返回顶部
- 拖拽Dialog
+ - 拖拽Select
- 拖拽看板
- 列表拖拽
- SplitPane
@@ -210,6 +216,14 @@ Detailed changes for each release are documented in the [release notes](https://
[Paypal Me](https://www.paypal.me/panfree23)
+## Browsers support
+
+Modern browsers and Internet Explorer 10+.
+
+| [
](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
+| --------- | --------- | --------- | --------- |
+| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
+
## License
[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE)
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 5eba7eb3..26a5584a 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -58,8 +58,10 @@ const devWebpackConfig = merge(baseWebpackConfig, {
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
- path: config.dev.assetsPublicPath + config.dev.assetsSubDirectory
- })
+ templateParameters: {
+ BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory,
+ },
+ }),
]
})
diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js
index 01f85732..946a134a 100644
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -56,7 +56,9 @@ const webpackConfig = merge(baseWebpackConfig, {
inject: true,
favicon: resolve('favicon.ico'),
title: 'vue-element-admin',
- path: config.build.assetsPublicPath + config.build.assetsSubDirectory,
+ templateParameters: {
+ BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory,
+ },
minify: {
removeComments: true,
collapseWhitespace: true,
diff --git a/index.html b/index.html
index 489d1a53..7a7ecacf 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
vue-element-admin
-
+
diff --git a/package.json b/package.json
index c65b3b22..75d88dd4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-element-admin",
- "version": "3.9.0",
+ "version": "3.9.3",
"description": "A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "Pan ",
"license": "MIT",
@@ -38,12 +38,11 @@
"clipboard": "1.7.1",
"codemirror": "5.39.2",
"connect": "3.6.6",
- "driver.js": "0.5.2",
+ "driver.js": "0.8.1",
"dropzone": "5.2.0",
"echarts": "4.1.0",
"element-ui": "2.4.6",
"file-saver": "1.3.8",
- "font-awesome": "4.7.0",
"js-cookie": "2.2.0",
"jsonlint": "1.6.3",
"jszip": "3.1.5",
@@ -52,12 +51,12 @@
"nprogress": "0.2.0",
"screenfull": "3.3.3",
"showdown": "1.8.6",
- "simplemde": "1.11.2",
"sortablejs": "1.7.0",
+ "tui-editor": "1.2.7",
"vue": "2.5.17",
"vue-count-to": "1.0.13",
"vue-i18n": "7.3.2",
- "vue-router": "3.0.1",
+ "vue-router": "3.0.2",
"vue-splitpane": "1.0.2",
"vuedraggable": "^2.16.0",
"vuex": "3.0.1",
diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue
index 32a8fb69..554abe8d 100644
--- a/src/components/Breadcrumb/index.vue
+++ b/src/components/Breadcrumb/index.vue
@@ -3,7 +3,7 @@
{{ generateTitle(item.meta.title) }}
- {{ generateTitle(item.meta.title) }}
+ {{ generateTitle(item.meta.title) }}
@@ -30,12 +30,8 @@ export default {
methods: {
generateTitle,
getBreadcrumb() {
- const { params } = this.$route
let matched = this.$route.matched.filter(item => {
if (item.name) {
- // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
- var toPath = pathToRegexp.compile(item.path)
- item.path = toPath(params)
return true
}
})
@@ -44,6 +40,20 @@ export default {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(matched)
}
this.levelList = matched
+ },
+ pathCompile(path) {
+ // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
+ const { params } = this.$route
+ var toPath = pathToRegexp.compile(path)
+ return toPath(params)
+ },
+ handleLink(item) {
+ const { redirect, path } = item
+ if (redirect) {
+ this.$router.push(redirect)
+ return
+ }
+ this.$router.push(this.pathCompile(path))
}
}
}
diff --git a/src/components/Charts/mixins/resize.js b/src/components/Charts/mixins/resize.js
index dc61f859..c4c432f4 100644
--- a/src/components/Charts/mixins/resize.js
+++ b/src/components/Charts/mixins/resize.js
@@ -1,6 +1,11 @@
import { debounce } from '@/utils'
export default {
+ data() {
+ return {
+ sidebarElm: null
+ }
+ },
mounted() {
this.__resizeHandler = debounce(() => {
if (this.chart) {
@@ -9,14 +14,13 @@ export default {
}, 100)
window.addEventListener('resize', this.__resizeHandler)
- const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
- sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
+ this.sidebarElm = document.getElementsByClassName('sidebar-container')[0]
+ this.sidebarElm && this.sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this.__resizeHandler)
- const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
- sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
+ this.sidebarElm && this.sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
},
methods: {
sidebarResizeHandler(e) {
diff --git a/src/components/DragSelect/index.vue b/src/components/DragSelect/index.vue
new file mode 100644
index 00000000..513be006
--- /dev/null
+++ b/src/components/DragSelect/index.vue
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/LangSelect/index.vue b/src/components/LangSelect/index.vue
index 31cc80d0..ef5f2c44 100644
--- a/src/components/LangSelect/index.vue
+++ b/src/components/LangSelect/index.vue
@@ -6,6 +6,7 @@
中文
English
+ Español
diff --git a/src/components/MarkdownEditor/defaultOptions.js b/src/components/MarkdownEditor/defaultOptions.js
new file mode 100644
index 00000000..303aa13d
--- /dev/null
+++ b/src/components/MarkdownEditor/defaultOptions.js
@@ -0,0 +1,31 @@
+// doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
+export default {
+ minHeight: '200px',
+ previewStyle: 'vertical',
+ useCommandShortcut: true,
+ useDefaultHTMLSanitizer: true,
+ usageStatistics: false,
+ hideModeSwitch: false,
+ toolbarItems: [
+ 'heading',
+ 'bold',
+ 'italic',
+ 'strike',
+ 'divider',
+ 'hr',
+ 'quote',
+ 'divider',
+ 'ul',
+ 'ol',
+ 'task',
+ 'indent',
+ 'outdent',
+ 'divider',
+ 'table',
+ 'image',
+ 'link',
+ 'divider',
+ 'code',
+ 'codeblock'
+ ]
+}
diff --git a/src/components/MarkdownEditor/index.vue b/src/components/MarkdownEditor/index.vue
index 9847668a..4a6d8b0f 100644
--- a/src/components/MarkdownEditor/index.vue
+++ b/src/components/MarkdownEditor/index.vue
@@ -1,16 +1,18 @@
-
-
-
+
-
-
diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue
new file mode 100644
index 00000000..8d104e84
--- /dev/null
+++ b/src/components/Pagination/index.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
diff --git a/src/components/ScrollPane/index.vue b/src/components/ScrollPane/index.vue
index d4d75aee..89998e80 100644
--- a/src/components/ScrollPane/index.vue
+++ b/src/components/ScrollPane/index.vue
@@ -5,7 +5,7 @@
diff --git a/src/views/dashboard/admin/components/LineChart.vue b/src/views/dashboard/admin/components/LineChart.vue
index ef493c4b..dfd121e5 100644
--- a/src/views/dashboard/admin/components/LineChart.vue
+++ b/src/views/dashboard/admin/components/LineChart.vue
@@ -32,7 +32,8 @@ export default {
},
data() {
return {
- chart: null
+ chart: null,
+ sidebarElm: null
}
},
watch: {
@@ -55,8 +56,8 @@ export default {
}
// 监听侧边栏的变化
- const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
- sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
+ this.sidebarElm = document.getElementsByClassName('sidebar-container')[0]
+ this.sidebarElm && this.sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
},
beforeDestroy() {
if (!this.chart) {
@@ -66,8 +67,7 @@ export default {
window.removeEventListener('resize', this.__resizeHandler)
}
- const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
- sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
+ this.sidebarElm && this.sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
this.chart.dispose()
this.chart = null
diff --git a/src/views/errorPage/404.vue b/src/views/errorPage/404.vue
index c3eafea0..6483fd5f 100644
--- a/src/views/errorPage/404.vue
+++ b/src/views/errorPage/404.vue
@@ -14,7 +14,7 @@
{{ message }}
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
- 返回首页
+ 返回首页
diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue
index c7ec1eb0..ce22b3b4 100644
--- a/src/views/example/components/ArticleDetail.vue
+++ b/src/views/example/components/ArticleDetail.vue
@@ -143,12 +143,16 @@ export default {
title: [{ validator: validateRequire }],
content: [{ validator: validateRequire }],
source_uri: [{ validator: validateSourceUri, trigger: 'blur' }]
- }
+ },
+ tempRoute: {}
}
},
computed: {
contentShortLength() {
return this.postForm.content_short.length
+ },
+ lang() {
+ return this.$store.getters.language
}
},
created() {
@@ -158,6 +162,11 @@ export default {
} else {
this.postForm = Object.assign({}, defaultForm)
}
+
+ // Why need to make a copy of this.$route here?
+ // Because if you enter this page and quickly switch tag, may be in the execution of the setTagsViewTitle function, this.$route is no longer pointing to the current page
+ // https://github.com/PanJiaChen/vue-element-admin/issues/1221
+ this.tempRoute = Object.assign({}, this.$route)
},
methods: {
fetchData(id) {
@@ -166,10 +175,18 @@ export default {
// Just for test
this.postForm.title += ` Article Id:${this.postForm.id}`
this.postForm.content_short += ` Article Id:${this.postForm.id}`
+
+ // Set tagsview title
+ this.setTagsViewTitle()
}).catch(err => {
console.log(err)
})
},
+ setTagsViewTitle() {
+ const title = this.lang === 'zh' ? '编辑文章' : 'Edit Article'
+ const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.postForm.id}` })
+ this.$store.dispatch('updateVisitedView', route)
+ },
submitForm() {
this.postForm.display_time = parseInt(this.display_time / 1000)
console.log(this.postForm)
@@ -217,7 +234,7 @@ export default {