@tplc/business 0.5.55 → 0.5.57

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,21 @@
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.57](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.56...v0.5.57) (2025-12-02)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 修改尺寸 ([c932da4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c932da48d9693508b72cba09aae7f96208d00da1))
11
+
12
+ ### [0.5.56](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.55...v0.5.56) (2025-11-28)
13
+
14
+
15
+ ### ✨ Features | 新功能
16
+
17
+ * 新增节流 ([671b7fe](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/671b7fe766d17fe904beb5a457ef263f1006b0ae))
18
+ * 样式调整 ([9db0e26](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9db0e26b22faaa3678f501d06baa03245e5aa744))
19
+
5
20
  ### [0.5.55](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.52...v0.5.55) (2025-11-24)
6
21
 
7
22
 
@@ -203,7 +203,12 @@ const onActionClick = async () => {
203
203
  /** 锚点跳转 */
204
204
  case 16:
205
205
  if (url) {
206
- onPageScrollSelector(url)
206
+ const windowInfo = uni.getWindowInfo()
207
+ const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
208
+ onPageScrollSelector(
209
+ url,
210
+ 'offsetTopNavbar' in props && props.offsetTopNavbar ? navbarHeight : 0,
211
+ )
207
212
  }
208
213
  break
209
214
  case 17:
@@ -47,7 +47,7 @@ export type LcbActionViewProps = {
47
47
  | 12
48
48
  | 13
49
49
  | 14
50
- | 16
50
+ | 17
51
51
  | 21
52
52
  | 22
53
53
  | 23
@@ -72,7 +72,8 @@ export type LcbActionViewProps = {
72
72
  phoneNumber?: string
73
73
  }
74
74
  | {
75
- jumpType: 17
75
+ jumpType: 16
76
+ offsetTopNavbar?: boolean
76
77
  }
77
78
  | {
78
79
  jumpType: 144
@@ -28,6 +28,7 @@
28
28
  <wd-img
29
29
  :height="transformValueUnit(imgHeight)"
30
30
  mode="heightFix"
31
+ :key="imgKey"
31
32
  :src="current === index ? item.activeUrl : item.inactiveUrl"
32
33
  />
33
34
  <view v-if="showTitle" class="truncate px-2">{{ item.title }}</view>
@@ -37,10 +38,11 @@
37
38
  </template>
38
39
 
39
40
  <script setup lang="ts">
40
- import { ref } from 'vue'
41
+ import { ref, watch } from 'vue'
41
42
  import useSyncForm from '../../../../hooks/useSyncForm'
42
43
  import { transformValueUnit } from '../../../../utils/transform'
43
44
  import { LcbTabsProps } from '../../types'
45
+ import { throttle } from '@tplc/wot/components/common/util'
44
46
  const props = withDefaults(defineProps<LcbTabsProps>(), {
45
47
  imgTitleGap: 24,
46
48
  activeColor: 'var(--wot-color-theme)',
@@ -48,6 +50,10 @@ const props = withDefaults(defineProps<LcbTabsProps>(), {
48
50
  })
49
51
  const { syncForm } = useSyncForm(props.dynamicScope)
50
52
  const current = ref(0)
53
+ const imgKey = ref(0)
54
+ const debounceFn = throttle(() => {
55
+ imgKey.value++
56
+ }, 300)
51
57
  defineOptions({
52
58
  name: 'LcbTagsItem',
53
59
  options: {
@@ -56,6 +62,12 @@ defineOptions({
56
62
  styleIsolation: 'shared',
57
63
  },
58
64
  })
65
+ watch(
66
+ () => props.imgHeight,
67
+ () => {
68
+ debounceFn()
69
+ },
70
+ )
59
71
  const handleTagClick = (name: string, index: number) => {
60
72
  current.value = index
61
73
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.55",
3
+ "version": "0.5.57",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -45,7 +45,7 @@ export type LcbActionViewProps = {
45
45
  | 12
46
46
  | 13
47
47
  | 14
48
- | 16
48
+ | 17
49
49
  | 21
50
50
  | 22
51
51
  | 23
@@ -67,7 +67,8 @@ export type LcbActionViewProps = {
67
67
  phoneNumber?: string
68
68
  }
69
69
  | {
70
- jumpType: 17
70
+ jumpType: 16
71
+ offsetTopNavbar?: boolean
71
72
  }
72
73
  | {
73
74
  jumpType: 144
@@ -99,7 +99,7 @@ declare const _default: import('vue').DefineComponent<
99
99
  | 12
100
100
  | 13
101
101
  | 14
102
- | 16
102
+ | 17
103
103
  | 21
104
104
  | 22
105
105
  | 23
@@ -284,7 +284,8 @@ declare const _default: import('vue').DefineComponent<
284
284
  requestParams: Record<string, any>
285
285
  }
286
286
  } & {
287
- jumpType: 17
287
+ jumpType: 16
288
+ offsetTopNavbar?: boolean
288
289
  } & import('../lcb-block/types').LcbBlockProps
289
290
  >,
290
291
  {
@@ -2,23 +2,16 @@ import { UploadMethod } from '@tplc/wot/types/components/wd-upload/types'
2
2
  export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
3
3
  /** 获取上个页面Exposed */
4
4
  export declare const getExposed: () => any
5
- export declare const getCurrentPage: () =>
6
- | {
7
- pageId: number
8
- fullPath: string
9
- options: {}
10
- route: string
11
- }
12
- | {
13
- pageId: string
14
- fullPath: string
15
- options: any
16
- route: string
17
- }
5
+ export declare const getCurrentPage: () => {
6
+ pageId: string | number
7
+ fullPath: string
8
+ options: any
9
+ route: string
10
+ }
18
11
  export declare const getPreviousPageId: () => string | number
19
12
  /** 合并url参数 url = /pages/data/index?id=1&name=2 urlParams = id=1&name=2&type=1 */
20
13
  export declare const getFinalUrl: (url: string, urlParams?: string) => string
21
- export declare const onPageScrollSelector: (selector: string) => void
14
+ export declare const onPageScrollSelector: (selector: string, offsetTop?: number) => void
22
15
  export declare const getPreviewImageUrl: (url: string, width?: number) => string
23
16
  /** 根据屏幕宽度 图片高度宽度比例 列数与 间隙宽度 计算图片高度 */
24
17
  export declare const calculateImageHeight: (
package/utils/utils.ts CHANGED
@@ -43,7 +43,7 @@ export const getCurrentPage = () => {
43
43
 
44
44
  const fullPath = decodeURIComponent(page.$page?.fullPath?.split('?')[1] || '')
45
45
  return {
46
- pageId: isH5 ? page.$page.id : page.__wxWebviewId__,
46
+ pageId: isH5 ? page.$page.id : page.getPageId?.(),
47
47
  fullPath: page.$page?.fullPath,
48
48
  options: parse(fullPath) as any,
49
49
  route: page.route,
@@ -73,10 +73,11 @@ export const getFinalUrl = (url: string, urlParams?: string) => {
73
73
  })}`
74
74
  }
75
75
 
76
- export const onPageScrollSelector = (selector: string) => {
76
+ export const onPageScrollSelector = (selector: string, offsetTop?: number) => {
77
77
  const prefix = uni.$lcb.layoutId ? `#${uni.$lcb.layoutId} >>> #` : '#'
78
78
  uni.pageScrollTo({
79
79
  selector: `${prefix}${selector}`,
80
+ offsetTop,
80
81
  })
81
82
  }
82
83