11<template lang="pug">
22 div( :class ="$style.list" )
33 //- transition
4- div( v-if ="list.length" : class = "$style.content" )
4+ div( v-if ="delayShow && list.length" : class = "$style.content" )
55 div( :class ="$style.thead" )
66 table
77 thead
1818 table
1919 tbody
2020 tr( v-for ='(item, index) in list' : key= 'item.songmid'
21- @click ="handleDoubleClick(index)" : class = "[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') || item.source == 'tx' ? $style.disabled : '']" )
21+ @click ="handleDoubleClick(index)" : class = "[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') || item.source == 'tx' || item.source == 'wy' ? $style.disabled : '']" )
2222 td.nobreak.center ( style ="width: 37px;" @click.stop )
2323 material-checkbox( :id ="index.toString()" v-model ="selectdData" : value= "item" )
2424 td.break ( style ="width: 25%;" ) {{item.name}}
3737 //- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)') +
3838 td( style ="width: 10%;" ) {{item.interval || '--/--'}}
3939 div( :class ="$style.noItem" v-else )
40+ p 加载中...
4041 material-download-modal( :show ="isShowDownload" : musicInfo= "musicInfo" @select ="handleAddDownload" @close ="isShowDownload = false" )
4142 material-download-multiple-modal( :show ="isShowDownloadMultiple" : list= "selectdData" @select ="handleAddDownloadMultiple" @close ="isShowDownloadMultiple = false" )
4243 material-flow-btn( :show ="isShowEditBtn" : add- btn= "false" : play- btn= "false" @btn-click ="handleFlowBtnClick" )
@@ -57,6 +58,7 @@ export default {
5758 isIndeterminate: false ,
5859 isShowEditBtn: false ,
5960 isShowDownloadMultiple: false ,
61+ delayShow: false ,
6062 }
6163 },
6264 computed: {
@@ -119,6 +121,11 @@ export default {
119121 // this.handleSearch(this.text, this.page)
120122 // }
121123 // },
124+ mounted () {
125+ if (this .list .length > 150 ) {
126+ setTimeout (() => this .delayShow = true , 200 )
127+ } else this .delayShow = true
128+ },
122129 methods: {
123130 ... mapMutations (' list' , [' defaultListRemove' , ' defaultListRemoveMultiple' ]),
124131 ... mapActions (' download' , [' createDownload' , ' createDownloadMultiple' ]),
@@ -137,7 +144,7 @@ export default {
137144 this .clickIndex = - 1
138145 },
139146 testPlay (index ) {
140- if ((this .isAPITemp && this .list [index].source != ' kw' ) || this .list [index].source == ' tx' ) return
147+ if ((this .isAPITemp && this .list [index].source != ' kw' ) || this .list [index].source == ' tx' || this . list [index]. source == ' wy ' ) return
141148 this .setList ({ list: this .list , listId: ' test' , index })
142149 },
143150 handleRemove (index ) {
@@ -147,7 +154,7 @@ export default {
147154 switch (info .action ) {
148155 case ' download' :
149156 const minfo = this .list [info .index ]
150- if ((this .isAPITemp && minfo .source != ' kw' ) || minfo .source == ' tx' ) return
157+ if ((this .isAPITemp && minfo .source != ' kw' ) || minfo .source == ' tx' || minfo . source == ' wy ' ) return
151158 this .musicInfo = minfo
152159 this .$nextTick (() => {
153160 this .isShowDownload = true
@@ -173,7 +180,7 @@ export default {
173180 this .selectdData = []
174181 },
175182 handleAddDownloadMultiple (type ) {
176- const list = this .setting .apiSource == ' temp' ? this .selectdData .filter (s => s .source == ' kw' ) : this .selectdData .filter (s => s .source != ' tx' )
183+ const list = this .setting .apiSource == ' temp' ? this .selectdData .filter (s => s .source == ' kw' ) : this .selectdData .filter (s => s .source != ' tx' && s . source != ' wy ' )
177184 this .createDownloadMultiple ({ list, type })
178185 this .resetSelect ()
179186 this .isShowDownloadMultiple = false
@@ -239,6 +246,20 @@ export default {
239246 opacity : .5 ;
240247}
241248
249+ .no-item {
250+ position : relative ;
251+ height : 100% ;
252+ display : flex ;
253+ flex-flow : column nowrap ;
254+ justify-content : center ;
255+ align-items : center ;
256+
257+ p {
258+ font-size : 24px ;
259+ color : #ccc ;
260+ }
261+ }
262+
242263each(@themes , {
243264 :global(#container .@{value} ) {
244265 .tbody {
0 commit comments