mirror of
https://github.com/koel/koel
synced 2025-02-17 22:08:28 +00:00
fix: selecting songs failed after dblclick
This commit is contained in:
parent
93ddbe7c13
commit
a363cdd67e
1 changed files with 4 additions and 9 deletions
|
@ -64,15 +64,9 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'SongList'
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import isMobile from 'ismobilejs'
|
||||
import { orderBy } from 'lodash'
|
||||
import { findIndex, orderBy } from 'lodash'
|
||||
|
||||
import {
|
||||
computed,
|
||||
|
@ -231,8 +225,9 @@ const toggleRow = (row: SongRow) => {
|
|||
}
|
||||
|
||||
const selectRowsBetween = (first: SongRow, second: SongRow) => {
|
||||
const indexes = [songRows.value.indexOf(first), songRows.value.indexOf(second)]
|
||||
|
||||
const firstIndex = Math.max(0, findIndex(songRows.value, row => row.song.id === first.song.id))
|
||||
const secondIndex = Math.max(0, findIndex(songRows.value, row => row.song.id === second.song.id))
|
||||
const indexes = [firstIndex, secondIndex]
|
||||
indexes.sort((a, b) => a - b)
|
||||
|
||||
for (let i = indexes[0]; i <= indexes[1]; ++i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue