From 4896c4dda5f9e3cd45dc9a99790605376d08a5f1 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 10 Feb 2020 17:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=86=85=E5=AE=B9=E5=8C=BA=E5=9F=9F=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E5=8F=B3=E5=87=BB=E6=97=B6=E8=87=AA=E5=8A=A8=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=88=97=E8=A1=A8=E5=B7=B2=E9=80=89=E6=96=87=E5=AD=97?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/components/material/SongList.vue | 25 +++++++++++++++--- src/renderer/views/List.vue | 26 ++++++++++++++++--- src/renderer/views/Search.vue | 25 +++++++++++++++--- 4 files changed, 68 insertions(+), 9 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 78dd576c..1785a81a 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,7 @@ ### 新增 - 允许选中列表内歌曲名、歌手名、专辑名内的文字,选中后可使用键盘快捷键进行复制 +- 新增在列表可选内容区域鼠标右击时自动复制列表已选文字的功能 - 任务下载失败时将显示搜索按钮,方便在其他源搜索该歌曲 ### 优化 diff --git a/src/renderer/components/material/SongList.vue b/src/renderer/components/material/SongList.vue index bdd30f4f..bca5aaaf 100644 --- a/src/renderer/components/material/SongList.vue +++ b/src/renderer/components/material/SongList.vue @@ -16,7 +16,7 @@ div(:class="$style.songList") th.nobreak(style="width: 10%;") 时长 div.scroll(:class="$style.tbody" ref="dom_scrollContent") table - tbody + tbody(@contextmenu="handleContextMenu") tr(v-for='(item, index) in list' :key='item.songmid' @click="handleDoubleClick($event, index)") td.nobreak.center(style="width: 37px;" @click.stop) material-checkbox(:id="index.toString()" v-model="selectdList" @change="handleChangeSelect" :value="item") @@ -37,7 +37,8 @@ div(:class="$style.songList") //- button.btn-info(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k'] || item._types.flac" @click.stop='openDownloadModal(index)') 下载 //- button.btn-secondary(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k']" @click.stop='testPlay(index)') 试听 //- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)') + - td(style="width: 10%;") {{item.interval || '--/--'}} + td(style="width: 10%;") + span(:class="$style.time") {{item.interval || '--/--'}} div(:class="$style.pagination") material-pagination(:count="total" :limit="limit" :page="page" @btn-click="handleTogglePage") div(v-else :class="$style.noitem") @@ -47,7 +48,7 @@ div(:class="$style.songList") @@ -207,6 +220,12 @@ export default { :global(.badge) { opacity: .85; } + + &.copying { + .labelSource, .time { + display: none; + } + } } .pagination { text-align: center; diff --git a/src/renderer/views/List.vue b/src/renderer/views/List.vue index 033bed89..bda56b41 100644 --- a/src/renderer/views/List.vue +++ b/src/renderer/views/List.vue @@ -16,7 +16,7 @@ th.nobreak(style="width: 10%;") 时长 div.scroll(:class="$style.tbody" @scroll="handleScroll" ref="dom_scrollContent") table - tbody + tbody(@contextmenu="handleContextMenu") tr(v-for='(item, index) in list' :key='item.songmid' :id="'mid_' + item.songmid" @click="handleDoubleClick($event, index)" :class="[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') ? $style.disabled : '']") td.nobreak.center(style="width: 37px;" @click.stop) @@ -39,7 +39,8 @@ //- button.btn-secondary(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k']" @click.stop='testPlay(index)') 试听 //- button.btn-secondary(type='button' @click.stop='handleRemove(index)') 删除 //- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)') + - td(style="width: 10%;") {{item.interval || '--/--'}} + td(style="width: 10%;") + span(:class="$style.time") {{item.interval || '--/--'}} div(:class="$style.noItem" v-else) p(v-text="list.length ? '加载中...' : '列表竟然是空的...'") material-download-modal(:show="isShowDownload" :musicInfo="musicInfo" @select="handleAddDownload" @close="isShowDownload = false") @@ -51,7 +52,7 @@ @@ -371,6 +385,12 @@ export default { color: @color-theme; } } + + &.copying { + .labelSource, .time { + display: none; + } + } } .labelSource { diff --git a/src/renderer/views/Search.vue b/src/renderer/views/Search.vue index 17cc9a94..7b492b34 100644 --- a/src/renderer/views/Search.vue +++ b/src/renderer/views/Search.vue @@ -18,7 +18,7 @@ th.nobreak(style="width: 10%;") 时长 div.scroll(:class="$style.tbody" ref="dom_scrollContent") table - tbody + tbody(@contextmenu="handleContextMenu") tr(v-for='(item, index) in listInfo.list' :key='item.songmid' @click="handleDoubleClick($event, index)") td.nobreak.center(style="width: 37px;" @click.stop) material-checkbox(:id="index.toString()" v-model="selectdData" :value="item") @@ -36,7 +36,8 @@ :play-btn="item.source == 'kw' || !isAPITemp" :download-btn="item.source == 'kw' || !isAPITemp" @btn-click="handleListBtnClick") - td(style="width: 10%;") {{item.interval || '--/--'}} + td(style="width: 10%;") + span(:class="$style.time") {{item.interval || '--/--'}} div(:class="$style.pagination") material-pagination(:count="listInfo.total" :limit="listInfo.limit" :page="page" @btn-click="handleTogglePage") div(v-else :class="$style.noitem") @@ -50,7 +51,7 @@ @@ -288,6 +301,12 @@ export default { :global(.badge) { opacity: .85; } + + &.copying { + .labelSource, .time { + display: none; + } + } } .listBtn { min-height: 24px;