|
|
@@ -935,45 +935,46 @@ export struct PlaylistDetailPage {
|
|
|
// 空状态容器
|
|
|
Column() {
|
|
|
// 空状态图标容器
|
|
|
- Stack() {
|
|
|
- // 背景圆圈
|
|
|
- Circle({ width: 160, height: 160 })
|
|
|
- .fill('#0a59f715')
|
|
|
- .border({
|
|
|
- width: 2,
|
|
|
- color: '#0a59f71a'
|
|
|
- })
|
|
|
-
|
|
|
- // 中间圆圈
|
|
|
- Circle({ width: 120, height: 120 })
|
|
|
- .fill('#0a59f722')
|
|
|
-
|
|
|
- // 音符图标
|
|
|
- Image($r('app.media.music_red'))
|
|
|
- .width(64)
|
|
|
- .height(64)
|
|
|
- .opacity(0.6)
|
|
|
- .fillColor(this.themeColor )
|
|
|
- }
|
|
|
- .margin({ bottom: 32 })
|
|
|
-
|
|
|
- // 空状态标题
|
|
|
- Text('歌单还是空的')
|
|
|
- .fontSize(22)
|
|
|
- .fontColor($r('app.color.text_color'))
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
- .margin({ bottom: 12 })
|
|
|
- .letterSpacing(0.5)
|
|
|
-
|
|
|
- // 空状态描述
|
|
|
- Text('快来添加你喜欢的音乐吧\n让这个歌单充满美妙的旋律')
|
|
|
- .fontSize(15)
|
|
|
- .fontColor($r('app.color.text_color'))
|
|
|
- .opacity(0.8)
|
|
|
- .margin({ bottom: 40 })
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
- .lineHeight(24)
|
|
|
- .maxLines(2)
|
|
|
+ emptyView(this.themeColor)
|
|
|
+ // Stack() {
|
|
|
+ // // 背景圆圈
|
|
|
+ // Circle({ width: 160, height: 160 })
|
|
|
+ // .fill('#0a59f715')
|
|
|
+ // .border({
|
|
|
+ // width: 2,
|
|
|
+ // color: '#0a59f71a'
|
|
|
+ // })
|
|
|
+ //
|
|
|
+ // // 中间圆圈
|
|
|
+ // Circle({ width: 120, height: 120 })
|
|
|
+ // .fill('#0a59f722')
|
|
|
+ //
|
|
|
+ // // 音符图标
|
|
|
+ // Image($r('app.media.music_red'))
|
|
|
+ // .width(64)
|
|
|
+ // .height(64)
|
|
|
+ // .opacity(0.6)
|
|
|
+ // .fillColor(this.themeColor )
|
|
|
+ // }
|
|
|
+ // .margin({ bottom: 32 })
|
|
|
+ //
|
|
|
+ // // 空状态标题
|
|
|
+ // Text('歌单还是空的')
|
|
|
+ // .fontSize(22)
|
|
|
+ // .fontColor($r('app.color.text_color'))
|
|
|
+ // .fontWeight(FontWeight.Bold)
|
|
|
+ // .margin({ bottom: 12 })
|
|
|
+ // .letterSpacing(0.5)
|
|
|
+ //
|
|
|
+ // // 空状态描述
|
|
|
+ // Text('快来添加你喜欢的音乐吧\n让这个歌单充满美妙的旋律')
|
|
|
+ // .fontSize(15)
|
|
|
+ // .fontColor($r('app.color.text_color'))
|
|
|
+ // .opacity(0.8)
|
|
|
+ // .margin({ bottom: 40 })
|
|
|
+ // .textAlign(TextAlign.Center)
|
|
|
+ // .lineHeight(24)
|
|
|
+ // .maxLines(2)
|
|
|
|
|
|
// 添加歌曲按钮
|
|
|
Button() {
|
|
|
@@ -1264,3 +1265,57 @@ export async function convertPlaylistSongsToVideoItems(context: Context,playlist
|
|
|
LogUtil.info(`heanup 转换完成,共 ${videoItems.length} 首歌曲`)
|
|
|
return videoItems
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+@Builder
|
|
|
+export function emptyView(themeColor: ResourceColor) {
|
|
|
+
|
|
|
+ Column(){
|
|
|
+ Stack() {
|
|
|
+ // 背景圆圈
|
|
|
+ Circle({ width: 160, height: 160 })
|
|
|
+ .fill('#0a59f715')
|
|
|
+ .border({
|
|
|
+ width: 2,
|
|
|
+ color: '#0a59f71a'
|
|
|
+ })
|
|
|
+
|
|
|
+ // 中间圆圈
|
|
|
+ Circle({ width: 120, height: 120 })
|
|
|
+ .fill('#0a59f722')
|
|
|
+
|
|
|
+ // 音符图标
|
|
|
+ Image($r('app.media.music_red'))
|
|
|
+ .width(64)
|
|
|
+ .height(64)
|
|
|
+ .opacity(0.6)
|
|
|
+ .fillColor(themeColor )
|
|
|
+ }
|
|
|
+ .margin({ bottom: 32 })
|
|
|
+
|
|
|
+ // 空状态标题
|
|
|
+ Text('歌曲还是空的')
|
|
|
+ .fontSize(22)
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
+ .fontWeight(FontWeight.Bold)
|
|
|
+ .margin({ bottom: 12 })
|
|
|
+ .letterSpacing(0.5)
|
|
|
+
|
|
|
+ // 空状态描述
|
|
|
+ Text('快来添加你喜欢的音乐吧\n让这个歌单充满美妙的旋律')
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
+ .opacity(0.8)
|
|
|
+ .margin({ bottom: 40 })
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .lineHeight(24)
|
|
|
+ .maxLines(2)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|