|
|
@@ -1916,7 +1916,7 @@ export struct LocalMusic {
|
|
|
|
|
|
Scroll() {
|
|
|
Column() {
|
|
|
- if(!this.isShowCoverTitle()){
|
|
|
+ if(!this.isShowCoverHeader()){
|
|
|
Column(){
|
|
|
Line().width('100%').height('100%')
|
|
|
}
|
|
|
@@ -2000,15 +2000,25 @@ export struct LocalMusic {
|
|
|
|
|
|
Column() {
|
|
|
|
|
|
- if(this.isShowCoverTitle()){
|
|
|
- // this.coverTitle()
|
|
|
- }else{
|
|
|
+ if(!this.isShowCoverHeader()){
|
|
|
this.tabTitle()
|
|
|
this.listViewTitle()
|
|
|
}
|
|
|
|
|
|
if(this.isGridMusic){
|
|
|
- this.getGridView()
|
|
|
+ if(this.isShowCoverHeader()){
|
|
|
+ Scroll(){
|
|
|
+ Column(){
|
|
|
+ this.coverHeader()
|
|
|
+ this.getGridView()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // .height(px2vp(DisplayUtil.getHeight()-AppUtil.getStatusBarHeight()-AppUtil.getNavigationIndicatorHeight()))
|
|
|
+ }else{
|
|
|
+ this.getGridView()
|
|
|
+ }
|
|
|
+
|
|
|
}else {
|
|
|
this.getListView()
|
|
|
}
|
|
|
@@ -2134,7 +2144,7 @@ export struct LocalMusic {
|
|
|
duration: 666,
|
|
|
curve: 'ease-in-out' // 可选动画曲线
|
|
|
})
|
|
|
- .position(this.isShowCoverTitle()?{ bottom:78}
|
|
|
+ .position(this.isShowCoverHeader()?{ bottom:78}
|
|
|
:{ bottom:this.isPhoneLan()?130: 168 }) // 将 Row 固定在底部
|
|
|
|
|
|
|
|
|
@@ -2675,8 +2685,8 @@ export struct LocalMusic {
|
|
|
@State currentTitleName:string = ''//点击歌单,艺术家,专辑进去后的标题
|
|
|
@State currentTitleCover:string|ResourceStr = ''//点击歌单,艺术家,专辑进去后的封面
|
|
|
|
|
|
- isShowCoverTitle(){
|
|
|
- if(this.modeType==0&&!this.isGridMusic){
|
|
|
+ isShowCoverHeader(){
|
|
|
+ if(this.modeType==0){
|
|
|
if(this.isHistory||this.isFavMusic){
|
|
|
return true
|
|
|
}
|
|
|
@@ -2684,12 +2694,12 @@ export struct LocalMusic {
|
|
|
return true
|
|
|
}
|
|
|
}
|
|
|
- return (this.modeType==2||this.modeType==3)&&this.isCanBack&&!this.isGridMusic
|
|
|
+ return (this.modeType==2||this.modeType==3)&&this.isCanBack
|
|
|
}
|
|
|
|
|
|
@Builder
|
|
|
- coverTitle() {
|
|
|
- if(this.isShowCoverTitle()){
|
|
|
+ coverHeader() {
|
|
|
+ if(this.isShowCoverHeader()){
|
|
|
Column(){
|
|
|
|
|
|
Stack() {
|
|
|
@@ -3255,7 +3265,6 @@ export struct LocalMusic {
|
|
|
GridItem() {
|
|
|
Stack({ alignContent: Alignment.Center }) {
|
|
|
this.MusicItemGrid(item,index)
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
// .transition(TransitionEffect.scale({ x: 0.8, y: 0.8 }).animation({ duration: 500 }))
|
|
|
@@ -3336,7 +3345,9 @@ export struct LocalMusic {
|
|
|
.editMode(true)
|
|
|
.transition(TransitionEffect.move(TransitionEdge.BOTTOM)
|
|
|
.animation({ duration: 500, curve: Curve.Ease }))
|
|
|
- .margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
|
|
|
+ // .margin({ bottom: this.isCoverOpacity() ? 80 : 175 })
|
|
|
+ .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 40:80)
|
|
|
+ :(this.isShowCoverHeader()? 90:175) })
|
|
|
.layoutWeight(1)
|
|
|
.scrollBar(BarState.Off)
|
|
|
.supportAnimation(true)
|
|
|
@@ -3705,7 +3716,7 @@ export struct LocalMusic {
|
|
|
getListView() {
|
|
|
|
|
|
List({ scroller: this.listScroller }) {
|
|
|
- ListItemGroup({ header: this.coverTitle() }) {
|
|
|
+ ListItemGroup({ header: this.coverHeader() }) {
|
|
|
LazyForEach(this.dataSource, (item: VideoItem, index: number) => {
|
|
|
ListItem() {
|
|
|
Column() {
|
|
|
@@ -3872,8 +3883,8 @@ export struct LocalMusic {
|
|
|
|
|
|
}))
|
|
|
// .divider({ strokeWidth: 1, color: this.isDarkMode? '#333333':'#ffe9f0f0' })
|
|
|
- .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverTitle()? 20:80)
|
|
|
- :(this.isShowCoverTitle()? 70:166) })
|
|
|
+ .margin({ bottom: this.isCoverOpacity() ? (this.isShowCoverHeader()? 20:80)
|
|
|
+ :(this.isShowCoverHeader()? 70:166) })
|
|
|
.cachedCount(6)
|
|
|
.borderRadius(20)
|
|
|
.transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 1.2, y: 1.2 }).animation({ duration: 500 }),
|