sard-uniapp 1.24.4 → 1.24.6
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 +26 -0
- package/components/accordion-item/index.scss +2 -2
- package/components/action-sheet/index.scss +4 -4
- package/components/avatar/README.md +60 -8
- package/components/avatar/avatar.d.ts +5 -1
- package/components/avatar/avatar.vue +42 -7
- package/components/avatar/common.d.ts +4 -0
- package/components/avatar/index.scss +21 -1
- package/components/avatar/variables.scss +5 -0
- package/components/avatar-group/avatar-group.d.ts +17 -0
- package/components/avatar-group/avatar-group.vue +75 -0
- package/components/avatar-group/common.d.ts +31 -0
- package/components/avatar-group/common.js +3 -0
- package/components/avatar-group/index.d.ts +1 -0
- package/components/avatar-group/index.js +1 -0
- package/components/avatar-group/index.scss +9 -0
- package/components/back-top/index.scss +1 -1
- package/components/badge/index.scss +1 -1
- package/components/button/index.scss +2 -2
- package/components/calendar-month/index.scss +3 -3
- package/components/card/index.scss +2 -2
- package/components/cascader/index.scss +1 -1
- package/components/check-icon/index.scss +1 -1
- package/components/checkbox-input/checkbox-input.vue +6 -2
- package/components/config/index.d.ts +4 -0
- package/components/config/index.js +4 -0
- package/components/count-down/common.js +1 -1
- package/components/crop-image/index.scss +1 -1
- package/components/dialog/index.scss +1 -1
- package/components/dropdown/index.scss +1 -1
- package/components/fab/index.scss +1 -0
- package/components/fab-item/index.scss +1 -1
- package/components/floating-bubble/index.scss +1 -1
- package/components/form/index.scss +1 -1
- package/components/grid-item/index.scss +2 -2
- package/components/indexes-anchor/index.scss +1 -1
- package/components/indexes-nav/index.scss +2 -2
- package/components/input/index.scss +2 -2
- package/components/keyboard/index.scss +5 -5
- package/components/list-item/index.scss +2 -2
- package/components/menu-item/index.scss +2 -2
- package/components/notice-bar/index.scss +3 -2
- package/components/overlay/index.scss +1 -1
- package/components/pagination/index.scss +2 -2
- package/components/pagination/pagination.d.ts +1 -1
- package/components/password-input/index.scss +6 -7
- package/components/picker/common.js +2 -1
- package/components/picker/picker.vue +11 -14
- package/components/picker-input/README.md +4 -0
- package/components/picker-input/picker-input.vue +2 -2
- package/components/picker-popout/README.md +4 -0
- package/components/picker-popout/picker-popout.vue +7 -7
- package/components/popout/index.scss +1 -1
- package/components/popout/popout.vue +50 -48
- package/components/popover/index.scss +3 -3
- package/components/progress-bar/index.scss +5 -5
- package/components/progress-circle/index.scss +1 -1
- package/components/scroll-list/index.scss +2 -2
- package/components/search/index.scss +3 -3
- package/components/segmented/index.scss +2 -2
- package/components/segmented-item/index.scss +1 -1
- package/components/share-sheet/index.scss +4 -4
- package/components/sidebar-item/index.scss +1 -1
- package/components/signature/index.scss +2 -2
- package/components/skeleton/index.scss +1 -1
- package/components/skeleton-block/index.scss +1 -1
- package/components/slider/index.scss +7 -7
- package/components/step/index.scss +3 -3
- package/components/stepper/index.scss +4 -4
- package/components/swiper-dot/index.scss +4 -4
- package/components/swiper-dot/swiper-dot.d.ts +1 -1
- package/components/switch/index.scss +3 -3
- package/components/tab/index.scss +3 -2
- package/components/tabbar/index.scss +1 -1
- package/components/table/index.scss +1 -1
- package/components/table-cell/index.scss +1 -1
- package/components/table-row/index.scss +1 -1
- package/components/tabs/index.scss +1 -1
- package/components/timeline-item/index.scss +2 -2
- package/components/toast/index.scss +1 -1
- package/components/tree/index.scss +1 -1
- package/components/tree-node/index.scss +3 -3
- package/components/upload/index.scss +2 -2
- package/components/upload-preview/index.scss +5 -5
- package/global.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/utils/dom.js +20 -12
package/utils/dom.js
CHANGED
|
@@ -25,21 +25,29 @@ export function getBoundingClientRect(selector, instance) {
|
|
|
25
25
|
* 获取可使用窗口尺寸
|
|
26
26
|
*/
|
|
27
27
|
export function getWindowInfo() {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const windowInfo = uni.getWindowInfo?.();
|
|
29
|
+
if (windowInfo && windowInfo.safeAreaInsets) {
|
|
30
|
+
return windowInfo;
|
|
30
31
|
}
|
|
31
32
|
const info = uni.getSystemInfoSync();
|
|
33
|
+
const { pixelRatio, screenWidth, screenHeight, windowWidth, windowHeight, statusBarHeight = 0, windowTop = 0, windowBottom = 0, } = info;
|
|
34
|
+
const safeArea = info.safeArea || windowInfo.safeArea;
|
|
32
35
|
return {
|
|
33
|
-
pixelRatio
|
|
34
|
-
screenWidth
|
|
35
|
-
screenHeight
|
|
36
|
-
windowWidth
|
|
37
|
-
windowHeight
|
|
38
|
-
statusBarHeight
|
|
39
|
-
windowTop
|
|
40
|
-
windowBottom
|
|
41
|
-
safeArea
|
|
42
|
-
safeAreaInsets:
|
|
36
|
+
pixelRatio,
|
|
37
|
+
screenWidth,
|
|
38
|
+
screenHeight,
|
|
39
|
+
windowWidth,
|
|
40
|
+
windowHeight,
|
|
41
|
+
statusBarHeight,
|
|
42
|
+
windowTop,
|
|
43
|
+
windowBottom,
|
|
44
|
+
safeArea,
|
|
45
|
+
safeAreaInsets: {
|
|
46
|
+
top: safeArea.top,
|
|
47
|
+
bottom: screenHeight - safeArea.bottom,
|
|
48
|
+
left: safeArea.left,
|
|
49
|
+
right: screenWidth - safeArea.right,
|
|
50
|
+
},
|
|
43
51
|
screenTop: 0,
|
|
44
52
|
};
|
|
45
53
|
}
|