From cc4e2c5cadd7f3eeaae85711765139e4014afd8d Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Fri, 1 Jan 2021 15:24:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E9=A1=B5=E9=9D=A2=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/History.vue | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/History.vue b/src/components/History.vue index b5f30e9..1d4fdcf 100644 --- a/src/components/History.vue +++ b/src/components/History.vue @@ -111,7 +111,6 @@ import { mapMutations } from 'vuex' import { history, sites, setting } from '../lib/dexie' import zy from '../lib/site/tools' -import Sortable from 'sortablejs' import { remote } from 'electron' import fs from 'fs' import Waterfall from 'vue-waterfall-plugin' @@ -321,21 +320,8 @@ export default { }) }) }, - rowDrop () { - if (!document.getElementById('history-table')) return - const tbody = document.getElementById('history-table').querySelector('.el-table__body-wrapper tbody') - const _this = this - Sortable.create(tbody, { - onEnd ({ newIndex, oldIndex }) { - const currRow = _this.history.splice(oldIndex, 1)[0] - _this.history.splice(newIndex, 0, currRow) - _this.updateDatabase() - } - }) - }, updateViewMode () { if (this.setting.historyViewMode === 'table') { - setTimeout(() => { this.rowDrop() }, 100) this.showShiftPrompt() } else { setTimeout(() => { if (this.$refs.historyWaterfall) this.$refs.historyWaterfall.refresh() }, 700) @@ -358,7 +344,6 @@ export default { } }, mounted () { - if (this.setting.historyViewMode === 'table') setTimeout(() => { this.rowDrop() }, 100) addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true }) addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false }) addEventListener('resize', () => {