@tplc/business 0.5.54 → 0.5.56

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,38 @@
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.56](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.55...v0.5.56) (2025-11-28)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增节流 ([671b7fe](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/671b7fe766d17fe904beb5a457ef263f1006b0ae))
11
+ * 样式调整 ([9db0e26](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9db0e26b22faaa3678f501d06baa03245e5aa744))
12
+
13
+ ### [0.5.55](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.52...v0.5.55) (2025-11-24)
14
+
15
+
16
+ ### 🚀 Chore | 构建/工程依赖/工具
17
+
18
+ * **release:** 0.5.53 ([d196f57](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d196f57b4459a8348c433ea1e14a42389ebd0ba9))
19
+ * **release:** 0.5.54 ([08b6691](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/08b669104bd401efcaad993017f7b96b0cdd610b))
20
+ * **release:** 1.0.7 ([f8ce5c4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/f8ce5c455187ed95257ee8976a93c83c69519542))
21
+
22
+
23
+ ### ✨ Features | 新功能
24
+
25
+ * map ([49b348b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/49b348b1e537c77f8efd2e07866f5958fbef5c72))
26
+ * webp 调整 ([8bcb6c8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8bcb6c89a725f44b687fa1d5d459a4f0c2dc03d7))
27
+ * 修改数据 ([0b3c765](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/0b3c76502422df7f460dce3cc68c20d2496c8461))
28
+ * 兼容数据结构 ([ebf4369](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/ebf4369e46a5a51b5b172ec3db89382036a8a02a))
29
+ * 新增判断 ([197736a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/197736a34c0a5aed9b172b2dd5d7a6718affcaab))
30
+
31
+
32
+ ### 🐛 Bug Fixes | Bug 修复
33
+
34
+ * 兼容list为空 ([a6e0af9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a6e0af9a21548192572d94abba9bcd8d7c1053c1))
35
+ * 图片版本 ([4ec8bc2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/4ec8bc20925733debdc1911a5dde272eab8b8913))
36
+
5
37
  ### [0.5.54](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v1.0.7...v0.5.54) (2025-11-21)
6
38
 
7
39
  ### [0.5.53](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.46...v0.5.53) (2025-11-20)
@@ -69,7 +69,7 @@ interface UnconditionedLayoutConfig {
69
69
  recommendIcon: string
70
70
  }
71
71
 
72
- const list = inject(LIST_FORM_CHOOSER_VALUES) as Ref<ListFormChooserValues>
72
+ const list = inject(LIST_FORM_CHOOSER_VALUES, {}) as Ref<ListFormChooserValues>
73
73
  const form = inject(FORM_KEY) as Ref<Record<string, any>>
74
74
  const props = withDefaults(
75
75
  defineProps<{
@@ -98,6 +98,7 @@ const itemStyle = computed(() => {
98
98
  })
99
99
 
100
100
  const options = computed(() => {
101
+ if (!list || !list.value) return []
101
102
  return Object.keys(list.value)
102
103
  .filter((v) => list.value[v])
103
104
  .map((v) => {
@@ -128,6 +129,7 @@ const removeTag = (value: string, key: string, length: number) => {
128
129
  */
129
130
  const handleClearAll = () => {
130
131
  form.value.keywords = undefined
132
+ if (!list || !list.value) return
131
133
  Object.keys(list.value).forEach((v) => {
132
134
  form.value[v] = undefined
133
135
  list.value[v] = []
@@ -3,6 +3,7 @@ import { computed, provide, useAttrs } from 'vue'
3
3
  import { LcbProductItemProps } from './types'
4
4
  import ItemValue from './components/ItemValue.vue'
5
5
  import { transformValueUnit } from '../../utils/transform'
6
+ import { videoPreviewProps } from '@tplc/wot/types/components/wd-video-preview/types'
6
7
  defineOptions({
7
8
  name: 'LcbProductItem',
8
9
  options: {
@@ -220,7 +221,12 @@ const itemStyle = computed(() => {
220
221
 
221
222
  <view class="flex gap-1 items-center">
222
223
  <ItemValue prop="orderSkuCountTips" />
223
- <view class="text-3.5 text-#969696" v-if="orderSkuCountTips && orderTips">·</view>
224
+ <view
225
+ class="text-3.5 text-#969696"
226
+ v-if="orderSkuCountTips && orderTips && orderTipsVisible && orderSkuCountTipsVisible"
227
+ >
228
+ ·
229
+ </view>
224
230
  <ItemValue prop="orderTips" />
225
231
  </view>
226
232
 
@@ -373,7 +379,12 @@ const itemStyle = computed(() => {
373
379
  </ItemValue>
374
380
  <view class="flex gap-1 items-center">
375
381
  <ItemValue prop="orderSkuCountTips"></ItemValue>
376
- <view class="text-3.5 text-#969696" v-if="orderSkuCountTips && orderTips">·</view>
382
+ <view
383
+ class="text-3.5 text-#969696"
384
+ v-if="orderSkuCountTips && orderTips && orderTipsVisible && orderSkuCountTipsVisible"
385
+ >
386
+ ·
387
+ </view>
377
388
  <ItemValue prop="orderTips">
378
389
  <!-- <template #orderTips="{ value }">
379
390
  <slot name="orderTips" :value="value" />
@@ -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.54",
3
+ "version": "0.5.56",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -2,19 +2,12 @@ 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
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,