没有封面时也显示封面占位

This commit is contained in:
2023-10-24 05:10:58 +08:00
parent 1fec1bb2f6
commit d75641c8b8
1 changed files with 8 additions and 4 deletions

View File

@ -250,10 +250,14 @@ export default class MusicList {
maxWidth: '100%',
},
children: [
...(item.picture ? [Img({
src: item.picture,
style: { width: '2em', height: '2em', borderRadius: '.25em' }
})] : []),
//...(item.picture ? [Img({
// src: item.picture,
// style: { width: '2em', height: '2em', borderRadius: '.25em' }
//})] : []),
Img({
src: item.picture || 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
style: { width: '2em', height: '2em', borderRadius: '.25em', backgroundColor: '#eee' },
}),
Span({
style: {
flex: 1,