This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
134 additions
and
4 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// 搜索的歌单显示效果 | ||
<template lang="pug"> | ||
router-link.s-sheet(v-if="list && list.name", :to="{path: '/main/listdetail', query: {id: list.id}}") | ||
.img | ||
img(v-imgsize="list.picUrl") | ||
.right-info | ||
.name {{list.name}} | ||
.disc | ||
.user {{getArtists}} | ||
.push-t {{getDate}} | ||
</template> | ||
<script> | ||
export default { | ||
computed: { | ||
// 获取艺术家信息[]解析 | ||
getArtists () { | ||
if (this.list.artists && this.list.artists.length) { | ||
return this.list.artists.map(item => item.name).join(' / ') | ||
} | ||
return this.list.artist.name | ||
}, | ||
// 发布时间 | ||
getDate () { | ||
return this.$dutils.utils.formatDate('yyyy-MM-dd', new Date(this.list.publishTime)) | ||
} | ||
}, | ||
props: { | ||
list: { | ||
type: Object, | ||
default: function () { | ||
return {} | ||
} | ||
} | ||
}, | ||
created () { | ||
console.log(this.list) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.s-sheet{ | ||
position: relative; | ||
@include border-1px(#eee); | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-start; | ||
padding: $auto_padding_l_r / 2 $auto_padding_l_r; | ||
.img{ | ||
flex:0 0 p2r(1.2rem); | ||
height: p2r(1.2rem); | ||
position: relative; | ||
display: block; | ||
img{ | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: p2r(0.06rem); | ||
} | ||
&::before{ | ||
content: ''; | ||
background: url('./../../../../assets/images/ablum.png') 0 0 no-repeat; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: - p2r(0.2rem); | ||
bottom: 0; | ||
z-index: 1; | ||
} | ||
} | ||
.right-info{ | ||
flex:1 1 auto; | ||
overflow: hidden; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
height: p2r(1rem); | ||
align-items: flex-start; | ||
margin-left: $auto_padding_l_r * 3; | ||
.name{ | ||
font-size: $f_small_l; | ||
font-weight: 600; | ||
color: $text_gray_color; | ||
@include els(); | ||
} | ||
.disc{ | ||
width: 100%; | ||
display: flex; | ||
overflow: hidden; | ||
flex-wrap: nowrap; | ||
font-size: $f_small_x; | ||
color: $icon_color; | ||
justify-content: flex-start; | ||
@include els(); | ||
.push-t{ | ||
flex: 0 0 p2r(1.5rem); | ||
} | ||
.user{ | ||
flex: 0 0 auto; | ||
@include els(); | ||
} | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.