From 8f94a5604ddf0c57e1d903d29b094db375506eb3 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sat, 7 Nov 2020 14:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E5=A4=84=E7=90=86=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=97=B6=E6=94=AF=E6=8C=81shift=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditSites.vue | 20 ++++++++++++++++++++ src/components/IPTV.vue | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue index 15f25bb..3ac1bcc 100644 --- a/src/components/EditSites.vue +++ b/src/components/EditSites.vue @@ -21,6 +21,7 @@ { + selections.forEach(e => this.$refs.editSitesTable.toggleRowSelection(e, true)) + }) + this.selectionBegin = this.selectionEnd = '' + return + } + this.selectionBegin = row.id + }, handleSelectionChange (rows) { this.multipleSelection = rows }, @@ -473,6 +491,8 @@ export default { }, mounted () { this.rowDrop() + addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true }) + addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false }) }, created () { this.getSites() diff --git a/src/components/IPTV.vue b/src/components/IPTV.vue index 413e381..74d4236 100644 --- a/src/components/IPTV.vue +++ b/src/components/IPTV.vue @@ -21,6 +21,7 @@ size="mini" fit height="100%" row-key="id" :data="filteredTableData" @row-click="playEvent" + @select="selectionCellClick" @selection-change="handleSelectionChange" @sort-change="handleSortChange">> { + selections.forEach(e => this.$refs.iptvTable.toggleRowSelection(e, true)) + }) + this.selectionBegin = this.selectionEnd = '' + return + } + this.selectionBegin = row.id + }, handleSelectionChange (rows) { this.multipleSelection = rows }, @@ -476,6 +494,8 @@ export default { }, mounted () { this.rowDrop() + addEventListener('keydown', code => { if (code.keyCode === 16) this.shiftDown = true }) + addEventListener('keyup', code => { if (code.keyCode === 16) this.shiftDown = false }) }, created () { this.getChannels()