From 1336b92c2ff753c55b65d85b5fc54031f8ffdfc4 Mon Sep 17 00:00:00 2001 From: MaYuanhai <414199639@qq.com> Date: Thu, 26 Sep 2019 10:34:31 +0800 Subject: [PATCH 1/2] fix[Dashboard]: fixed debounce bug (#2586) (#2597) To fixed https://github.com/PanJiaChen/vue-element-admin/issues/2586 --- .../dashboard/admin/components/mixins/resize.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/views/dashboard/admin/components/mixins/resize.js b/src/views/dashboard/admin/components/mixins/resize.js index bcd17bf0..234953b1 100644 --- a/src/views/dashboard/admin/components/mixins/resize.js +++ b/src/views/dashboard/admin/components/mixins/resize.js @@ -3,10 +3,16 @@ import { debounce } from '@/utils' export default { data() { return { - $_sidebarElm: null + $_sidebarElm: null, + $_resizeHandler: null } }, mounted() { + this.$_resizeHandler = debounce(() => { + if (this.chart) { + this.chart.resize() + } + }, 100) this.$_initResizeEvent() this.$_initSidebarResizeEvent() }, @@ -27,13 +33,6 @@ export default { methods: { // use $_ for mixins properties // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential - $_resizeHandler() { - return debounce(() => { - if (this.chart) { - this.chart.resize() - } - }, 100)() - }, $_initResizeEvent() { window.addEventListener('resize', this.$_resizeHandler) }, From 4d2d52ef03862546496683f8c6b066f1db01c448 Mon Sep 17 00:00:00 2001 From: Francis <31059354+FrancisSano@users.noreply.github.com> Date: Fri, 27 Sep 2019 13:45:49 +0800 Subject: [PATCH 2/2] perf: VS Code support webpack alias file jump (#2609) --- jsconfig.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 jsconfig.json diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 00000000..958df046 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": "./", + "paths": { + "@/*": ["src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} \ No newline at end of file