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+. + +| [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..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+. + +| [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/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 @@