@solar-taro/core 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.6.2 (2026-03-12)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **core:** improve useRequest
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **core:** allow optional value parameter in number and currency functions
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - HyperLife1119
14
+
1
15
  ## 2.6.1 (2026-02-03)
2
16
 
3
17
  This was a version bump only for core to align it with other projects, there were no code changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/core",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "sideEffects": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/utils/window.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const getNavbarRect: () => {
1
+ export declare function getNavbarRect(): {
2
2
  height: number;
3
3
  paddingTop: number;
4
4
  paddingBottom: number;
package/utils/window.js CHANGED
@@ -1,16 +1,17 @@
1
1
  import { getMenuButtonBoundingClientRect, getSystemInfoSync } from '@tarojs/taro';
2
- import { once } from './helper.js';
3
- export const getNavbarRect = once(() => {
4
- const { statusBarHeight, windowWidth } = getSystemInfoSync();
2
+ export function getNavbarRect() {
3
+ const { statusBarHeight, windowWidth, deviceOrientation } = getSystemInfoSync();
5
4
  const { height, width, left, top } = getMenuButtonBoundingClientRect();
6
- const bottom = top - statusBarHeight;
5
+ const safeAreaTop = deviceOrientation === 'landscape' ? 0 : statusBarHeight; // 横屏时,状态栏隐藏,安全区顶部为0,竖屏时为状态栏高度
6
+ const bottom = top - safeAreaTop;
7
7
  return {
8
- height: statusBarHeight + height + bottom * 2,
9
- paddingTop: statusBarHeight + bottom,
8
+ height: safeAreaTop + height + bottom * 2,
9
+ paddingTop: safeAreaTop + bottom,
10
10
  paddingBottom: bottom,
11
11
  paddingLeft: windowWidth - width - left,
12
12
  paddingRight: windowWidth - width - left,
13
13
  buttonHeight: height,
14
14
  };
15
- });
15
+ }
16
+ ;
16
17
  //# sourceMappingURL=window.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../packages/core/src/utils/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE;IACrC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAC7D,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,+BAA+B,EAAE,CAAC;IACvE,MAAM,MAAM,GAAG,GAAG,GAAG,eAAgB,CAAC;IAEtC,OAAO;QACL,MAAM,EAAE,eAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC;QAC9C,UAAU,EAAE,eAAgB,GAAG,MAAM;QACrC,aAAa,EAAE,MAAM;QACrB,WAAW,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI;QACvC,YAAY,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI;QACxC,YAAY,EAAE,MAAM;KACrB,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../packages/core/src/utils/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAElF,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAChF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,+BAA+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