@tplc/business 0.5.62 → 0.5.64

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
@@ -2,6 +2,15 @@
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.64](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.63...v0.5.64) (2025-12-03)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 兼容h5 ([ca67c3f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/ca67c3fa6d5d7ef9adbf526c92d115cbed03c16d))
11
+
12
+ ### [0.5.63](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.62...v0.5.63) (2025-12-02)
13
+
5
14
  ### [0.5.62](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.61...v0.5.62) (2025-12-02)
6
15
 
7
16
  ### [0.5.61](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.60...v0.5.61) (2025-12-02)
@@ -67,7 +67,7 @@
67
67
  </template>
68
68
 
69
69
  <script setup lang="ts">
70
- import { computed, ref, inject, Ref, onMounted, getCurrentInstance } from 'vue'
70
+ import { computed, ref, inject, Ref, onMounted } from 'vue'
71
71
  import { jumpTypeMap, LcbActionViewProps } from './types'
72
72
  import { uploadFile } from '../../hooks/useUpload'
73
73
  import { getFinalUrl, onPageScrollSelector, getExposed, getCurrentPage } from '../../utils/utils'
@@ -92,7 +92,6 @@ const basicInfo = inject(USER_BASIC_INFO, {}) as unknown as Ref<Record<string, a
92
92
  const pageInfo = inject(PAGE_PROVIDE_KEY) as unknown as Ref<Record<string, any>>
93
93
  const showPoster = ref(false)
94
94
  const showPay = ref(false)
95
- const { proxy } = getCurrentInstance() as any
96
95
  const emits = defineEmits<{
97
96
  (e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
98
97
  (e: 'avatar', value: string): void
@@ -205,10 +204,8 @@ const onActionClick = async () => {
205
204
  case 16:
206
205
  if (url) {
207
206
  const windowInfo = uni.getWindowInfo()
208
- const navbarHeight = (windowInfo.statusBarHeight || 0) + 44 + 24
209
- const offsetTop =
210
- 'offsetTopNavbar' in props && props.offsetTopNavbar !== false ? navbarHeight : 0
211
- onPageScrollSelector(url, offsetTop, proxy)
207
+ const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
208
+ onPageScrollSelector(url, navbarHeight)
212
209
  }
213
210
  break
214
211
  case 17:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.62",
3
+ "version": "0.5.64",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,11 +11,7 @@ export declare const getCurrentPage: () => {
11
11
  export declare const getPreviousPageId: () => string | number
12
12
  /** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
13
13
  export declare const getFinalUrl: (url: string, urlParams?: string) => string
14
- export declare const onPageScrollSelector: (
15
- selector: string,
16
- offsetTop: number | undefined,
17
- proxy: any,
18
- ) => void
14
+ export declare const onPageScrollSelector: (selector: string, offsetTop?: number) => void
19
15
  export declare const getPreviewImageUrl: (url: string, width?: number) => string
20
16
  /** 根据屏幕宽度 图片高度宽度比例 列数与 间隙宽度 计算图片高度 */
21
17
  export declare const calculateImageHeight: (
package/utils/utils.ts CHANGED
@@ -74,10 +74,10 @@ export const getFinalUrl = (url: string, urlParams?: string) => {
74
74
  })}`
75
75
  }
76
76
 
77
- export const onPageScrollSelector = (selector: string, offsetTop = 0, proxy: any) => {
77
+ export const onPageScrollSelector = (selector: string, offsetTop = 0) => {
78
78
  const prefix = (uni.$lcb.layoutId ? `#${uni.$lcb.layoutId} >>> #` : '#') + selector
79
79
  // #ifdef H5
80
- const query = uni.createSelectorQuery().in(proxy)
80
+ const query = uni.createSelectorQuery().in(getCurrentInstance()?.proxy as any)
81
81
  // @ts-ignore
82
82
  query.selectViewport().scrollOffset()
83
83
  query.select(prefix).boundingClientRect()