|
@@ -2,14 +2,15 @@
|
|
|
<view class="box">
|
|
|
<view class="info">
|
|
|
<view class="name">{{ name }}</view>
|
|
|
- <button>收听{{ audioOption[type] }}</button>
|
|
|
+ <button @click="getPlay">收听{{ audioOption[type] }}</button>
|
|
|
</view>
|
|
|
<view class="list">
|
|
|
- <ol>
|
|
|
+ <ol v-if="data.childList.length > 0">
|
|
|
<li v-for="(item, index) in data.childList" :key="item.id">{{ index + 1 }}、{{ item.audioName }}</li>
|
|
|
</ol>
|
|
|
- <img class="pic" :src="pic" />
|
|
|
+ <view v-else>{{ audioOption[type] }}暂无内容</view>
|
|
|
</view>
|
|
|
+ <img class="pic" :src="pic" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -30,11 +31,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
-
|
|
|
- },
|
|
|
methods: {
|
|
|
-
|
|
|
+ getPlay() {
|
|
|
+ this.$emit('click')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -47,6 +47,7 @@ export default {
|
|
|
background: #EEE;
|
|
|
border-radius: 8px;
|
|
|
color: #000;
|
|
|
+ position: relative;
|
|
|
|
|
|
.info {
|
|
|
display: flex;
|
|
@@ -77,11 +78,11 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
position: relative;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
|
|
|
ol {
|
|
|
padding-inline-start: 18px;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: bold;
|
|
|
padding: 0;
|
|
|
|
|
|
li {
|
|
@@ -92,15 +93,15 @@ export default {
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .pic {
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- bottom: 8px;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- border-radius: 8px;
|
|
|
- }
|
|
|
+ .pic {
|
|
|
+ position: absolute;
|
|
|
+ right: 16px;
|
|
|
+ bottom: 24px;
|
|
|
+ width: 100px;
|
|
|
+ height: 100px;
|
|
|
+ border-radius: 8px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|