build: dropped use of lodash

This commit is contained in:
Fabio Di Stasio 2021-02-19 17:41:33 +01:00
parent 3b37b7432e
commit 9b60bfff8d
2 changed files with 8 additions and 5 deletions

View File

@ -58,7 +58,6 @@
"electron-updater": "^4.3.5", "electron-updater": "^4.3.5",
"faker": "^5.3.1", "faker": "^5.3.1",
"keytar": "^7.3.0", "keytar": "^7.3.0",
"lodash": "^4.17.20",
"moment": "^2.29.1", "moment": "^2.29.1",
"mssql": "^6.2.3", "mssql": "^6.2.3",
"mysql": "^2.18.1", "mysql": "^2.18.1",

View File

@ -117,7 +117,6 @@
<script> <script>
import { mapGetters, mapActions } from 'vuex'; import { mapGetters, mapActions } from 'vuex';
import _ from 'lodash';// TODO: remove
import Tables from '@/ipc-api/Tables'; import Tables from '@/ipc-api/Tables';
import Views from '@/ipc-api/Views'; import Views from '@/ipc-api/Views';
@ -172,6 +171,7 @@ export default {
isNewSchedulerModal: false, isNewSchedulerModal: false,
localWidth: null, localWidth: null,
debounceInterval: null,
isDatabaseContext: false, isDatabaseContext: false,
isTableContext: false, isTableContext: false,
isMiscContext: false, isMiscContext: false,
@ -199,9 +199,13 @@ export default {
} }
}, },
watch: { watch: {
localWidth: _.debounce(function (val) { localWidth (val) {
this.changeExplorebarSize(val); clearTimeout(this.debounceInterval);
}, 500),
this.debounceInterval = setTimeout(() => {
this.changeExplorebarSize(val);
}, 500);
},
isSelected (val) { isSelected (val) {
if (val) this.localWidth = this.explorebarSize; if (val) this.localWidth = this.explorebarSize;
} }