diff --git a/README.md b/README.md index ed083293..e2d9c034 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,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 +199,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+. + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](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..28fc0240 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -130,6 +130,7 @@ - 头像上传 - 返回顶部 - 拖拽Dialog + - 拖拽Select - 拖拽看板 - 列表拖拽 - SplitPane @@ -210,6 +211,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+. + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](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/package.json b/package.json index 06ac63d0..d795d163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-element-admin", - "version": "3.9.1", + "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", 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/Pagination/index.vue b/src/components/Pagination/index.vue new file mode 100644 index 00000000..9698232b --- /dev/null +++ b/src/components/Pagination/index.vue @@ -0,0 +1,99 @@ + + + + + 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/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue index 4e3dca2c..6ac6feae 100644 --- a/src/views/example/components/ArticleDetail.vue +++ b/src/views/example/components/ArticleDetail.vue @@ -143,7 +143,8 @@ export default { title: [{ validator: validateRequire }], content: [{ validator: validateRequire }], source_uri: [{ validator: validateSourceUri, trigger: 'blur' }] - } + }, + tempRoute: {} } }, computed: { @@ -161,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) { @@ -178,7 +184,7 @@ export default { }, setTagsViewTitle() { const title = this.lang === 'zh' ? '编辑文章' : 'Edit Article' - const route = Object.assign({}, this.$route, { title: `${title}-${this.postForm.id}` }) + const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.postForm.id}` }) this.$store.dispatch('updateVisitedView', route) }, submitForm() { diff --git a/src/views/example/list.vue b/src/views/example/list.vue index 4ab61d38..85ae4e43 100644 --- a/src/views/example/list.vue +++ b/src/views/example/list.vue @@ -50,26 +50,18 @@ -
- -
+