|
|
@@ -2,24 +2,30 @@
|
|
|
<div class="images">
|
|
|
<audio id="audioTag" class="noshow" autoplay :src="audioSrc"></audio>
|
|
|
<div class="audiocon">
|
|
|
- <div class="adcon">
|
|
|
- <div class="bar">
|
|
|
- <div class="activeLine" @click="seekTime"></div>
|
|
|
- <div :style="{ left: currentPosi + '%' }" class="dot"></div>
|
|
|
+ <!-- 左侧按钮 -->
|
|
|
+ <div class="leftBtn">
|
|
|
+ <div class="left" @click="$emit('sonCutMu','left')"></div>
|
|
|
+ <div class="play">
|
|
|
+ <img
|
|
|
+ @click="bofang"
|
|
|
+ :src="
|
|
|
+ require(`@/assets/images/tab4/${isPlay ? 'stop' : 'play'}.png`)
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</div>
|
|
|
- <img
|
|
|
- @click="bofang"
|
|
|
- :src="
|
|
|
- require(`@/assets/images/project/${
|
|
|
- isPlay ? 'zanting' : 'bofang'
|
|
|
- }.png`)
|
|
|
- "
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <div class="right" @click="$emit('sonCutMu','right')"></div>
|
|
|
+ </div>
|
|
|
+ <div class="adcon">
|
|
|
+ <div class="titleTxt">{{ title }}</div>
|
|
|
<div class="time">
|
|
|
<span>{{ time }}</span
|
|
|
><span> / {{ allTime }}</span>
|
|
|
</div>
|
|
|
+ <div class="bar">
|
|
|
+ <div class="activeLine" @click="seekTime"></div>
|
|
|
+ <div :style="{ width: currentPosi + '%' }" class="dot"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -32,6 +38,9 @@ export default {
|
|
|
audioSrc: {
|
|
|
type: String,
|
|
|
},
|
|
|
+ title: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -115,6 +124,7 @@ export default {
|
|
|
|
|
|
$("#audioTag").on("ended", () => {
|
|
|
// console.log('音乐播放完毕');
|
|
|
+ this.$emit('sonCutMu','right')
|
|
|
this.audioEnded();
|
|
|
});
|
|
|
});
|
|
|
@@ -164,12 +174,24 @@ export default {
|
|
|
height: 100%;
|
|
|
background-color: #c04340;
|
|
|
.adcon {
|
|
|
- width: 94%;
|
|
|
+ .titleTxt {
|
|
|
+ letter-spacing:2px;
|
|
|
+ position: absolute;
|
|
|
+ left: 5px;
|
|
|
+ top: -20px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ .time {
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: -20px;
|
|
|
+ }
|
|
|
+ width: 85%;
|
|
|
margin: 0 auto;
|
|
|
position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
+ bottom: 7px;
|
|
|
+ right: 40px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
@@ -178,15 +200,15 @@ export default {
|
|
|
position: relative;
|
|
|
background: none;
|
|
|
display: flex;
|
|
|
- width: 80%;
|
|
|
+ width: 100%;
|
|
|
height: 30px;
|
|
|
overflow: visible;
|
|
|
.activeLine {
|
|
|
- height: 10px;
|
|
|
+ height: 5px;
|
|
|
cursor: pointer;
|
|
|
overflow: hidden;
|
|
|
position: absolute;
|
|
|
- background-color: @color;
|
|
|
+ background-color: #fff;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
border-radius: 12px;
|
|
|
@@ -195,16 +217,27 @@ export default {
|
|
|
|
|
|
@wh: 20px;
|
|
|
.dot {
|
|
|
- width: @wh;
|
|
|
- height: @wh;
|
|
|
- display: inline-block;
|
|
|
+ pointer-events: none;
|
|
|
+ border-radius: 12px;
|
|
|
position: absolute;
|
|
|
- z-index: 999;
|
|
|
- background-color: #fff;
|
|
|
- top: 50%;
|
|
|
- transform: translate(-@wh*0.5, -50%);
|
|
|
- border-radius: 50%;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ height: 5px;
|
|
|
cursor: pointer;
|
|
|
+ background-color: #fad676;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+
|
|
|
+ // width: @wh;
|
|
|
+ // height: @wh;
|
|
|
+ // display: inline-block;
|
|
|
+ // position: absolute;
|
|
|
+ // z-index: 999;
|
|
|
+ // background-color: #fff;
|
|
|
+ // top: 50%;
|
|
|
+ // transform: translate(-@wh*0.5, -50%);
|
|
|
+ // border-radius: 50%;
|
|
|
+ // cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -224,11 +257,48 @@ export default {
|
|
|
}
|
|
|
|
|
|
&:last-of-type {
|
|
|
- color: @color;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .leftBtn {
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 12px;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ width: 120px;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ & > div {
|
|
|
+ width: 18px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+ .left {
|
|
|
+ background: url("../../assets/images/tab4/12.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .left:hover {
|
|
|
+ background: url("../../assets/images/tab4/13.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ background: url("../../assets/images/tab4/14.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .right:hover {
|
|
|
+ background: url("../../assets/images/tab4/15.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .play {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ & > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|