|
|
@@ -4795,7 +4795,7 @@ export struct LocalMusic {
|
|
|
.borderRadius(this.isCoverRectangle?9:'100%')
|
|
|
.clip(true)
|
|
|
.shadow({
|
|
|
- radius: 8,
|
|
|
+ radius: 2,
|
|
|
type: ShadowType.BLUR,
|
|
|
color: 'on_primary'
|
|
|
})
|
|
|
@@ -5402,17 +5402,19 @@ export struct LocalMusic {
|
|
|
)
|
|
|
.onScrollFrameBegin((offset: number) => {
|
|
|
// 获取当前滚动偏移量
|
|
|
- const currentOffsetY = this.waterScroller.currentOffset().yOffset;
|
|
|
- // 判断滚动方向
|
|
|
- if (currentOffsetY > this.prevOffsetY) {
|
|
|
- console.log("onecold 向上滚动");
|
|
|
- this.isShowTitleBar = false
|
|
|
- } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
- console.log("onecold 向下滚动");
|
|
|
- this.isShowTitleBar = true
|
|
|
- }
|
|
|
- // 更新前一次偏移量
|
|
|
- this.prevOffsetY = currentOffsetY;
|
|
|
+ if(this.autoHideTitle){
|
|
|
+ const currentOffsetY = this.scroller.currentOffset().yOffset;
|
|
|
+ // 判断滚动方向
|
|
|
+ if (currentOffsetY > this.prevOffsetY) {
|
|
|
+ console.log("onecold 向上滚动");
|
|
|
+ this.isShowTitleBar = false
|
|
|
+ } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
+ console.log("onecold 向下滚动");
|
|
|
+ this.isShowTitleBar = true
|
|
|
+ }
|
|
|
+ // 更新前一次偏移量
|
|
|
+ this.prevOffsetY = currentOffsetY;
|
|
|
+ }
|
|
|
|
|
|
return { offsetRemain: offset };
|
|
|
})
|
|
|
@@ -5784,17 +5786,19 @@ export struct LocalMusic {
|
|
|
this.endIndex = end
|
|
|
})
|
|
|
.onScrollFrameBegin((offset: number) => {
|
|
|
- const currentOffsetY = this.scroller.currentOffset().yOffset;
|
|
|
- // 判断滚动方向
|
|
|
- if (currentOffsetY > this.prevOffsetY) {
|
|
|
- console.log("onecold 向上滚动");
|
|
|
- this.isShowTitleBar = false
|
|
|
- } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
- console.log("onecold 向下滚动");
|
|
|
- this.isShowTitleBar = true
|
|
|
- }
|
|
|
- // 更新前一次偏移量
|
|
|
- this.prevOffsetY = currentOffsetY;
|
|
|
+ if(this.autoHideTitle){
|
|
|
+ const currentOffsetY = this.scroller.currentOffset().yOffset;
|
|
|
+ // 判断滚动方向
|
|
|
+ if (currentOffsetY > this.prevOffsetY) {
|
|
|
+ console.log("onecold 向上滚动");
|
|
|
+ this.isShowTitleBar = false
|
|
|
+ } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
+ console.log("onecold 向下滚动");
|
|
|
+ this.isShowTitleBar = true
|
|
|
+ }
|
|
|
+ // 更新前一次偏移量
|
|
|
+ this.prevOffsetY = currentOffsetY;
|
|
|
+ }
|
|
|
if (this.currentWidthBreakpoint !== WidthBreakpoint.WIDTH_SM ||
|
|
|
(this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_MD &&
|
|
|
this.currentHeightBreakpoint !== HeightBreakpoint.HEIGHT_SM)) {
|
|
|
@@ -6638,17 +6642,19 @@ export struct LocalMusic {
|
|
|
})
|
|
|
.onScrollFrameBegin((offset: number) => {
|
|
|
// 获取当前滚动偏移量
|
|
|
- const currentOffsetY = this.listScroller.currentOffset().yOffset;
|
|
|
- // 判断滚动方向
|
|
|
- if (currentOffsetY > this.prevOffsetY) {
|
|
|
- console.log("onecold 向上滚动");
|
|
|
- this.isShowTitleBar = false
|
|
|
- } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
- console.log("onecold 向下滚动");
|
|
|
- this.isShowTitleBar = true
|
|
|
- }
|
|
|
- // 更新前一次偏移量
|
|
|
- this.prevOffsetY = currentOffsetY;
|
|
|
+ if(this.autoHideTitle){
|
|
|
+ const currentOffsetY = this.scroller.currentOffset().yOffset;
|
|
|
+ // 判断滚动方向
|
|
|
+ if (currentOffsetY > this.prevOffsetY) {
|
|
|
+ console.log("onecold 向上滚动");
|
|
|
+ this.isShowTitleBar = false
|
|
|
+ } else if (currentOffsetY < this.prevOffsetY) {
|
|
|
+ console.log("onecold 向下滚动");
|
|
|
+ this.isShowTitleBar = true
|
|
|
+ }
|
|
|
+ // 更新前一次偏移量
|
|
|
+ this.prevOffsetY = currentOffsetY;
|
|
|
+ }
|
|
|
|
|
|
//滚动小屏幕 比如puraX外屏和手机横屏可以隐藏bottomBarHeight topBarHeight
|
|
|
// if (this.isPhoneLan()) {
|