|
@@ -16,8 +16,10 @@ import titleIcon2 from '../../image/title_icon2.png';
|
|
|
import playIcon from '../../image/music_play_icon.png';
|
|
|
import pauseIcon from '../../image/music_pause_icon.png';
|
|
|
import emptyIcon from '../../image/ins-empty-icon.png';
|
|
|
+import songIcon from '../../image/song_icon.png';
|
|
|
import { NoticeBar } from 'vant';
|
|
|
import PlayItem from '../play-item';
|
|
|
+import PlayLoading from '../play-loading'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'InstrumentInfo',
|
|
@@ -46,7 +48,7 @@ export default defineComponent({
|
|
|
title: ' ',
|
|
|
playState: 'pause' as 'play' | 'pause',
|
|
|
showPlayer: false,
|
|
|
- listActive: 0
|
|
|
+ listActive: null as any,
|
|
|
});
|
|
|
/** 选中的item */
|
|
|
const activeItem = computed(() => {
|
|
@@ -186,20 +188,40 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
)}
|
|
|
+ <div class={styles.songColumn}>
|
|
|
+ <img src={songIcon} />
|
|
|
+ <span>{props.type === 'instrument' ? '名曲鉴赏' : '代表作'}</span>
|
|
|
+ </div>
|
|
|
<div class={styles.insList}>
|
|
|
{forms.musicList.length ? (
|
|
|
<>
|
|
|
{forms.musicList.map((item: any, index: number) => {
|
|
|
return (
|
|
|
<div
|
|
|
- class={styles.li}
|
|
|
+ class={[styles.li, forms.listActive === index ? styles.liActive : '']}
|
|
|
onClick={(e: Event) => {
|
|
|
e.stopPropagation();
|
|
|
handlePlay(item);
|
|
|
}}>
|
|
|
- <img class={styles.liBg} src={musicBg} />
|
|
|
- <div class={styles.liName}>{item.name || '--'}</div>
|
|
|
- <img
|
|
|
+ <div class={styles.liBg}>
|
|
|
+ <img src={musicBg} />
|
|
|
+ <PlayLoading
|
|
|
+ class={[
|
|
|
+ forms.listActive === index &&
|
|
|
+ forms.playState === 'play'
|
|
|
+ ? ''
|
|
|
+ : styles.hidePlayLoading
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ {/* <div class={styles.liName}>{item.name || '--'}</div> */}
|
|
|
+ <NoticeBar
|
|
|
+ text={item.name}
|
|
|
+ color="#131415"
|
|
|
+ class={styles.liName}
|
|
|
+ background="none"
|
|
|
+ />
|
|
|
+ {/* <img
|
|
|
class={styles.liPlay}
|
|
|
src={
|
|
|
forms.listActive === index &&
|
|
@@ -207,7 +229,7 @@ export default defineComponent({
|
|
|
? pauseIcon
|
|
|
: playIcon
|
|
|
}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
</div>
|
|
|
);
|
|
|
})}
|