@tplc/business 0.5.60 → 0.5.61

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,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.61](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.60...v0.5.61) (2025-12-02)
6
+
5
7
  ### [0.5.60](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.59...v0.5.60) (2025-12-02)
6
8
 
7
9
  ### [0.5.59](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.58...v0.5.59) (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 } from 'vue'
70
+ import { computed, ref, inject, Ref, onMounted, getCurrentInstance } 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,6 +92,7 @@ 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
95
96
  const emits = defineEmits<{
96
97
  (e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
97
98
  (e: 'avatar', value: string): void
@@ -207,7 +208,7 @@ const onActionClick = async () => {
207
208
  const navbarHeight = (windowInfo.statusBarHeight || 0) + 44 + 24
208
209
  const offsetTop =
209
210
  'offsetTopNavbar' in props && props.offsetTopNavbar !== false ? navbarHeight : 0
210
- onPageScrollSelector(url, offsetTop)
211
+ onPageScrollSelector(url, offsetTop, proxy)
211
212
  }
212
213
  break
213
214
  case 17:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.60",
3
+ "version": "0.5.61",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,11 @@ 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: (selector: string, offsetTop?: number) => void
14
+ export declare const onPageScrollSelector: (
15
+ selector: string,
16
+ offsetTop: number | undefined,
17
+ proxy: any,
18
+ ) => void
15
19
  export declare const getPreviewImageUrl: (url: string, width?: number) => string
16
20
  /** 根据屏幕宽度 图片高度宽度比例 列数与 间隙宽度 计算图片高度 */
17
21
  export declare const calculateImageHeight: (
package/utils/utils.ts CHANGED
@@ -74,9 +74,9 @@ export const getFinalUrl = (url: string, urlParams?: string) => {
74
74
  })}`
75
75
  }
76
76
 
77
- export const onPageScrollSelector = (selector: string, offsetTop = 0) => {
77
+ export const onPageScrollSelector = (selector: string, offsetTop = 0, proxy: any) => {
78
78
  const prefix = (uni.$lcb.layoutId ? `#${uni.$lcb.layoutId} >>> #` : '#') + selector
79
- const query = uni.createSelectorQuery().in(getCurrentInstance()?.proxy)
79
+ const query = uni.createSelectorQuery().in(proxy)
80
80
  // @ts-ignore
81
81
  query.selectViewport().scrollOffset()
82
82
  query.select(prefix).boundingClientRect()