feat(basic): 添加屏幕宽高获取方法
- 在 WindowHelper 中添加获取屏幕宽度和高度的方法- 更新 README.md,添加新方法
这个提交包含在:
父节点
e25d5af4b6
当前提交
1b7d0b0bba
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
> - `RefreshView`参数不包含`onLoadMore`的时候,上划不应该提示`没有更多数据了`
|
> - `RefreshView`参数不包含`onLoadMore`的时候,上划不应该提示`没有更多数据了`
|
||||||
> - `RefreshView`添加一个`controller`,补充跳转到顶部,跳转到底部等方法,具体见文档`4.3`注释
|
> - `RefreshView`添加一个`controller`,补充跳转到顶部,跳转到底部等方法,具体见文档`4.3`注释
|
||||||
|
> - `WindowHelper`添加一个获取屏幕宽高的方法
|
||||||
>
|
>
|
||||||
|
|
||||||
# [v1.0.8] 2025.03.11
|
# [v1.0.8] 2025.03.11
|
||||||
|
|||||||
@ -553,6 +553,12 @@ WindowHelper.topRectHeight()
|
|||||||
|
|
||||||
// 底部安全区高度
|
// 底部安全区高度
|
||||||
WindowHelper.bottomRectHeight()
|
WindowHelper.bottomRectHeight()
|
||||||
|
|
||||||
|
// 屏幕宽度
|
||||||
|
WindowHelper.windowsWidth
|
||||||
|
|
||||||
|
// 屏幕高度
|
||||||
|
WindowHelper.windowsHeight
|
||||||
```
|
```
|
||||||
|
|
||||||
# **** 常见问题
|
# **** 常见问题
|
||||||
|
|||||||
@ -60,6 +60,7 @@ export struct SafeView {
|
|||||||
this.customBuilderParam()
|
this.customBuilderParam()
|
||||||
}
|
}
|
||||||
.padding({
|
.padding({
|
||||||
|
// 沉浸式直接0,如果给值的话,会造成用户ui无法覆盖状态栏
|
||||||
top: this.isImmersive ? 0 : this.hideNavBar ? 44 : WindowHelper.topRectHeight + 44,
|
top: this.isImmersive ? 0 : this.hideNavBar ? 44 : WindowHelper.topRectHeight + 44,
|
||||||
bottom: this.isImmersive ? 0 : WindowHelper.bottomRectHeight
|
bottom: this.isImmersive ? 0 : WindowHelper.bottomRectHeight
|
||||||
})
|
})
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户