@tplc/business 0.5.59 → 0.5.60
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 +2 -0
- package/components/lcb-action-view/lcb-action-view.vue +1 -1
- package/package.json +1 -1
- package/utils/utils.ts +17 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.5.60](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.59...v0.5.60) (2025-12-02)
|
|
6
|
+
|
|
5
7
|
### [0.5.59](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.58...v0.5.59) (2025-12-02)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -204,7 +204,7 @@ const onActionClick = async () => {
|
|
|
204
204
|
case 16:
|
|
205
205
|
if (url) {
|
|
206
206
|
const windowInfo = uni.getWindowInfo()
|
|
207
|
-
const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
|
|
207
|
+
const navbarHeight = (windowInfo.statusBarHeight || 0) + 44 + 24
|
|
208
208
|
const offsetTop =
|
|
209
209
|
'offsetTopNavbar' in props && props.offsetTopNavbar !== false ? navbarHeight : 0
|
|
210
210
|
onPageScrollSelector(url, offsetTop)
|
package/package.json
CHANGED
package/utils/utils.ts
CHANGED
|
@@ -74,22 +74,24 @@ export const getFinalUrl = (url: string, urlParams?: string) => {
|
|
|
74
74
|
})}`
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export const onPageScrollSelector = (selector: string, offsetTop
|
|
77
|
+
export const onPageScrollSelector = (selector: string, offsetTop = 0) => {
|
|
78
78
|
const prefix = (uni.$lcb.layoutId ? `#${uni.$lcb.layoutId} >>> #` : '#') + selector
|
|
79
|
-
uni
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
79
|
+
const query = uni.createSelectorQuery().in(getCurrentInstance()?.proxy)
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
query.selectViewport().scrollOffset()
|
|
82
|
+
query.select(prefix).boundingClientRect()
|
|
83
|
+
query.exec((res) => {
|
|
84
|
+
const scrollRes = res[0]
|
|
85
|
+
const rect = res[1]
|
|
86
|
+
const currentScrollTop = scrollRes?.scrollTop || 0
|
|
87
|
+
if (rect) {
|
|
88
|
+
const absoluteTop = rect.top + currentScrollTop
|
|
89
|
+
const adjustedScrollTop = absoluteTop - offsetTop
|
|
90
|
+
uni.pageScrollTo({
|
|
91
|
+
scrollTop: adjustedScrollTop,
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
})
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
export const getPreviewImageUrl = (url: string, width = 200) => {
|