|
@@ -1,12 +1,4 @@
|
|
|
-import {
|
|
|
- PropType,
|
|
|
- Transition,
|
|
|
- computed,
|
|
|
- defineComponent,
|
|
|
- reactive,
|
|
|
- ref,
|
|
|
- watch
|
|
|
-} from 'vue';
|
|
|
+import { PropType, computed, defineComponent, reactive, ref, watch } from 'vue';
|
|
|
import styles from './index.module.less';
|
|
|
import { NButton, NImage, NProgress, NSlider } from 'naive-ui';
|
|
|
import { IMusicItem } from '../../type';
|
|
@@ -14,6 +6,7 @@ import icon_pre from '../../images/icon_pre.png';
|
|
|
import icon_next from '../../images/icon_next.png';
|
|
|
import icon_play from '../../images/icon_play.png';
|
|
|
import icon_pause from '../../images/icon_pause.png';
|
|
|
+import song_arrow from '../../images/song-arrow.png';
|
|
|
import { getSecondRPM } from '/src/utils';
|
|
|
import TheNoticeBar from '/src/components/TheNoticeBar';
|
|
|
|
|
@@ -37,7 +30,7 @@ export default defineComponent({
|
|
|
default: ''
|
|
|
}
|
|
|
},
|
|
|
- emits: ['change'],
|
|
|
+ emits: ['change', 'show'],
|
|
|
setup(props, { emit }) {
|
|
|
let timer = null as any;
|
|
|
const audioData = reactive({
|
|
@@ -127,7 +120,7 @@ export default defineComponent({
|
|
|
props.item.titleImg ||
|
|
|
'https://oss.dayaedu.com/klx/16983720423251690789356356.png'
|
|
|
}
|
|
|
- onLoad={e => {
|
|
|
+ onLoad={(e: any) => {
|
|
|
(e.target as any).dataset.loaded = 'true';
|
|
|
}}
|
|
|
/>
|
|
@@ -202,7 +195,7 @@ export default defineComponent({
|
|
|
class={styles.timeProgress}
|
|
|
value={audioData.currentTime}
|
|
|
max={audioData.duration}
|
|
|
- onUpdate:value={val => handleChangeTime(val)}
|
|
|
+ onUpdate:value={(val: any) => handleChangeTime(val)}
|
|
|
/>
|
|
|
<div class={styles.time}>{time.value}</div>
|
|
|
<audio
|
|
@@ -218,6 +211,14 @@ export default defineComponent({
|
|
|
}}></audio>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ class={[styles.iconArrow, props.show ? '' : styles.down]}
|
|
|
+ onClick={() => {
|
|
|
+ emit('show', !props.show);
|
|
|
+ }}>
|
|
|
+ <img src={song_arrow as any} />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
);
|
|
|
}
|