@tplc/business 0.2.68 → 0.2.70

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,58 @@
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.2.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.56...v0.2.70) (2025-01-06)
6
+
7
+
8
+ ### 🐛 Bug Fixes | Bug 修复
9
+
10
+ * headerinfo 卡顿 ([dd7049e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dd7049ea008d0e6863de93979d331b078e4a14fe))
11
+ * 修复双列点击没有 ([33a0161](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/33a01615f99fed3ccbc2a41b90663edecbe1661b))
12
+ * 金额没对齐问题调整 ([3870681](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/38706811038fa18709a5916d1e30c3e25c8ce321))
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.1.51 ([da7388c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/da7388c14ac043049b282b05b90a448cab8d57c5))
18
+ * **release:** 0.1.52 ([be3c579](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/be3c57907e7ef4d5849c2a1e90217ef1e90e06e3))
19
+ * **release:** 0.2.57 ([f05c0bd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/f05c0bd11d05d0ddad48f3752eedeebad08b1cc1))
20
+ * **release:** 0.2.58 ([1840c54](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1840c5432bf3d3abbbe66c1dac86e9f90b2582b2))
21
+ * **release:** 0.2.59 ([1b19cc8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1b19cc8fd4e36d41c61e68f3ff8583a9436a5a99))
22
+ * **release:** 0.2.60 ([e0df949](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e0df94949ecba4c3219cb20904497e740ad49538))
23
+ * **release:** 0.2.61 ([57807da](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/57807da1235243d1f7da4b2cf9e0a43a463b8942))
24
+ * **release:** 0.2.62 ([d21caa6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d21caa604b62f2f0a7c0e3cfb8f9e2cb74f64670))
25
+ * **release:** 0.2.63 ([3dfe42a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3dfe42a6926c2288b73dc12e828f0f6cc64fa314))
26
+ * **release:** 0.2.64 ([da70e24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/da70e2444072ce9bd6ad16be86f3449f047f9ef5))
27
+ * **release:** 0.2.65 ([ec37cb3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ec37cb398a968caa72c5a3da0980cf6ac54a363d))
28
+ * **release:** 0.2.66 ([571d2b1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/571d2b1a6b9a946c52b35141039d40c8b961e7f0))
29
+ * **release:** 0.2.67 ([c5ccf81](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c5ccf81c1ba8904d8e5a22929f6b56eb275d37a9))
30
+ * **release:** 0.2.68 ([be890b1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/be890b138cd663afa9c241e8f5c89365c4d3d22b))
31
+ * **release:** 0.2.69 ([cc00e5d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cc00e5db93ab5e11dce050f4966f5175e8b3ebad))
32
+
33
+
34
+ ### ✨ Features | 新功能
35
+
36
+ * product 属性新增 ([7f27bc5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7f27bc5e8fd88f25a8af1b54f4834ddc5c41e20f))
37
+ * product组件切换为接口 ([520f1ca](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/520f1cad1ce517ee9de12845a513678396039e43))
38
+ * slider 改造 ([d472ee7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d472ee7a24b8539ec93defd27ab94cef14938d1f))
39
+ * 兼容地图 ([b189928](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b18992884c5e1a6dce947c5f7dbbb6750f5dfb5f))
40
+ * 城市回显 ([2ae514e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2ae514e8ba68fdceacf4ef3f2db66fe733ed97fc))
41
+ * 城市选择回显 ([eacf6d9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/eacf6d9cdfe56d7ac7c90c1cf3096de14c861ad5))
42
+ * 支持业务组件地址切换 ([83912ed](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/83912ede332299ad4b46d0018336883eaf0788a1))
43
+ * 新增切换模式 ([a8849df](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a8849df2d7ee55127f0b40c2c47f9e5c75cccab0))
44
+ * 新增配置 ([3f75c1f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3f75c1f75f1f86d1f5049700bef7af0b1d1185cd))
45
+ * 治理部分属性失效 ([d743827](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d743827467d0d1e666241327dbfbc5982b955ddf))
46
+ * 调整rate 数据类型 ([9809c85](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9809c8517514103ed8266ad68894701dc25c4252))
47
+ * 调整地图搜索 ([d8fe5fd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d8fe5fd3bd08e68cf39f76ca19e2419c6d747608))
48
+ * 调整布局 ([a4f75f4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a4f75f4bed928fb9d04b90184f9a4feb67a5457f))
49
+
50
+ ### [0.2.69](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.68...v0.2.69) (2025-01-05)
51
+
52
+
53
+ ### ✨ Features | 新功能
54
+
55
+ * product 属性新增 ([7f27bc5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7f27bc5e8fd88f25a8af1b54f4834ddc5c41e20f))
56
+
5
57
  ### [0.2.68](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.67...v0.2.68) (2025-01-05)
6
58
 
7
59
  ### [0.2.67](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.66...v0.2.67) (2025-01-05)
@@ -32,12 +32,17 @@
32
32
  >
33
33
  <slot name="list" :items="items" v-if="$slots.list" />
34
34
  <template v-else>
35
- <lcb-product v-bind="{ ...$props, ...attrs, form }" :items="items" v-if="$slots.item">
35
+ <lcb-product
36
+ v-bind="{ ...$props, ...attrs, form }"
37
+ :items="items"
38
+ filterList
39
+ v-if="$slots.item"
40
+ >
36
41
  <template #item="{ item }">
37
42
  <slot name="item" :item="item"></slot>
38
43
  </template>
39
44
  </lcb-product>
40
- <lcb-product v-bind="{ ...$props, ...attrs, form }" :items="items" v-else />
45
+ <lcb-product v-bind="{ ...$props, ...attrs, form }" filterList :items="items" v-else />
41
46
  </template>
42
47
  </FilterList>
43
48
  <lcb-map v-else-if="mode === 'map'" v-bind="{ ...info.listInfo, ...$props, ...attrs }" />
@@ -25,6 +25,15 @@
25
25
  ...list[current],
26
26
  ...attrs,
27
27
  }"
28
+ :layoutType="layoutType"
29
+ :coverImgStyle="{
30
+ width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
31
+ height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
32
+ minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
33
+ borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
34
+ ...(attrs?.coverImgStyle ?? {}),
35
+ }"
36
+ :titleLineClamp="titleLineClamp"
28
37
  />
29
38
  </lcb-action-view>
30
39
  <wd-icon
@@ -51,10 +60,12 @@
51
60
  <script lang="ts" setup>
52
61
  import { FORM_KEY } from '@tplc/business/constants'
53
62
  import { reactive, inject, ref, useAttrs, watch } from 'vue'
54
- import { LcbListInfo } from '../lcb-list/api'
55
63
  import { getPageOptions } from '../../utils/utils'
64
+ import { transformValueUnit } from '../../utils/transform'
56
65
  import { MapItem, MapMarker } from './types'
57
66
  import useAutoHeight from '../../hooks/useAutoHeight'
67
+ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
68
+ import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
58
69
  const height = useAutoHeight()
59
70
  defineOptions({
60
71
  name: 'LcbMap',
@@ -65,7 +76,7 @@ defineOptions({
65
76
  },
66
77
  })
67
78
  const attrs = useAttrs()
68
- const props = defineProps<LcbListInfo>()
79
+ const props = defineProps<LcbListProps & LcbListInfo>()
69
80
  const scaleRadius: Record<string, number> = {
70
81
  3: 1_000_000,
71
82
  4: 500_000,
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { ref, useAttrs, watch } from 'vue'
2
+ import { ref, useAttrs, watch, computed } from 'vue'
3
3
  import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
4
4
  import { LcbProductProps } from './types'
5
5
  import { transformValueUnit } from '../../utils/transform'
@@ -15,13 +15,13 @@ defineOptions({
15
15
  },
16
16
  })
17
17
  const attrs = useAttrs()
18
+ const list = ref<Record<string, any>[]>([])
18
19
  const props = withDefaults(defineProps<LcbProductProps>(), {
19
20
  listType: 'list',
20
- items: [],
21
21
  imageWidth: 200,
22
22
  imageHeight: 250,
23
23
  titleLineClamp: 2,
24
- } as any)
24
+ })
25
25
  defineSlots<{
26
26
  item(props: { item: any }): any
27
27
  }>()
@@ -32,6 +32,21 @@ watch(
32
32
  },
33
33
  { deep: true },
34
34
  )
35
+ const getData = async () => {
36
+ if (props.filterList) return
37
+ if (props.items?.length) {
38
+ const { data } = await uni.$lcb.http.post('/productInfo/filteredPage', {
39
+ productIdList: props.items.map((item) => item.productId),
40
+ })
41
+ list.value = data as Record<string, any>[]
42
+ } else {
43
+ list.value = []
44
+ }
45
+ }
46
+ watch(() => props.items, getData, { immediate: true, deep: true })
47
+ const renderList = computed(() => {
48
+ return props.filterList ? props.items : list.value
49
+ })
35
50
  </script>
36
51
 
37
52
  <template>
@@ -39,7 +54,7 @@ watch(
39
54
  <!-- 单列 -->
40
55
  <view class="flex flex-col gap-2 p-3" v-if="listType === 'list'">
41
56
  <lcb-action-view
42
- v-for="(item, index) in items"
57
+ v-for="(item, index) in renderList"
43
58
  :key="`${item?.productId}:${index}`"
44
59
  v-bind="item.link"
45
60
  >
@@ -71,7 +86,7 @@ watch(
71
86
  <!-- 双列 -->
72
87
  <view class="grid p-3 grid-cols-2 gap-2 box-border" v-if="listType === 'grid'">
73
88
  <lcb-action-view
74
- v-for="(item, index) in items"
89
+ v-for="(item, index) in renderList"
75
90
  :key="`${item?.productId}:${index}`"
76
91
  v-bind="item.link"
77
92
  >
@@ -103,7 +118,7 @@ watch(
103
118
  </view>
104
119
 
105
120
  <view class="lcb-product-waterfall">
106
- <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" ref="uWaterfallRef">
121
+ <u-waterfall :modelValue="renderList" v-if="listType === 'waterfall'" ref="uWaterfallRef">
107
122
  <template #left="{ leftList: list }">
108
123
  <view class="flex flex-col gap-3">
109
124
  <lcb-action-view
@@ -174,7 +189,7 @@ watch(
174
189
  <scroll-view v-if="listType == 'horizontal'" scroll-x>
175
190
  <view class="p-3 whitespace-nowrap overflow-x-auto">
176
191
  <view
177
- v-for="(item, index) in items"
192
+ v-for="(item, index) in renderList"
178
193
  :key="`${item?.productId}:${index}`"
179
194
  class="inline-block"
180
195
  :style="{
@@ -6,11 +6,15 @@ export interface LcbProductProps {
6
6
  imageRadius?: number
7
7
  borderRadius?: number
8
8
  itemWidth?: number // 列表项宽度
9
- items?: Record<string, any>[]
9
+ items?: {
10
+ productId: string
11
+ [key: string]: any
12
+ }[]
10
13
  form?: Record<string, any>
11
14
  layoutType?: 'vertical' | 'horizontal' // 布局方式
12
15
  titleLineClamp?: number
13
16
  coverImgStyle?: Record<string, any>
17
+ filterList?: boolean
14
18
  renderItemAbsoluteConfigLayout?: {
15
19
  dataset?: Record<string, any>
16
20
  blocks: any[]
@@ -250,7 +250,7 @@ defineSlots<{
250
250
  <ItemValue
251
251
  v-if="!!$slots?.['coverImg']"
252
252
  prop="coverImg"
253
- customClass="overflow-hidden relative"
253
+ customClass="overflow-hidden relative bg-gray-100 "
254
254
  >
255
255
  <template #default>
256
256
  <slot name="coverImgSection" />
@@ -259,7 +259,7 @@ defineSlots<{
259
259
  <slot name="coverImg" :value="value" />
260
260
  </template>
261
261
  </ItemValue>
262
- <ItemValue v-else prop="coverImg" customClass="overflow-hidden relative">
262
+ <ItemValue v-else prop="coverImg" customClass=" bg-gray-100 overflow-hidden relative">
263
263
  <template #default>
264
264
  <slot name="coverImgSection" />
265
265
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,6 +1,7 @@
1
- import { LcbListInfo } from '../lcb-list/api'
1
+ import { LcbListProps } from '@tplc/business/components/lcb-list/types'
2
+ import { LcbListInfo } from '@tplc/business/components/lcb-list/api'
2
3
  declare const _default: import('vue').DefineComponent<
3
- __VLS_TypePropsToOption<LcbListInfo>,
4
+ __VLS_TypePropsToOption<LcbListProps & LcbListInfo>,
4
5
  {},
5
6
  unknown,
6
7
  {},
@@ -10,7 +11,7 @@ declare const _default: import('vue').DefineComponent<
10
11
  {},
11
12
  string,
12
13
  import('vue').PublicProps,
13
- Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbListInfo>>>,
14
+ Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<LcbListProps & LcbListInfo>>>,
14
15
  {},
15
16
  {}
16
17
  >
@@ -5,7 +5,15 @@ declare function __VLS_template(): Readonly<{
5
5
  item(props: { item: any }): any
6
6
  }
7
7
  declare const __VLS_component: import('vue').DefineComponent<
8
- __VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, any>,
8
+ __VLS_WithDefaults<
9
+ __VLS_TypePropsToOption<LcbProductProps>,
10
+ {
11
+ listType: string
12
+ imageWidth: number
13
+ imageHeight: number
14
+ titleLineClamp: number
15
+ }
16
+ >,
9
17
  {},
10
18
  unknown,
11
19
  {},
@@ -17,30 +25,22 @@ declare const __VLS_component: import('vue').DefineComponent<
17
25
  import('vue').PublicProps,
18
26
  Readonly<
19
27
  import('vue').ExtractPropTypes<
20
- __VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, any>
28
+ __VLS_WithDefaults<
29
+ __VLS_TypePropsToOption<LcbProductProps>,
30
+ {
31
+ listType: string
32
+ imageWidth: number
33
+ imageHeight: number
34
+ titleLineClamp: number
35
+ }
36
+ >
21
37
  >
22
38
  >,
23
39
  {
24
- form: Record<string, any>
25
- imageRadius: number
26
- items: Record<string, any>[]
27
40
  imageWidth: number
28
- borderRadius: number
29
41
  imageHeight: number
30
42
  listType: 'list' | 'horizontal' | 'grid' | 'waterfall'
31
43
  titleLineClamp: number
32
- layoutType: 'vertical' | 'horizontal'
33
- itemWidth: number
34
- coverImgStyle: Record<string, any>
35
- renderItemAbsoluteConfigLayout: {
36
- dataset?: Record<string, any>
37
- blocks: any[]
38
- canvas: {
39
- width: number
40
- height: number
41
- backgroundColor?: string
42
- }
43
- }
44
44
  },
45
45
  {}
46
46
  >
@@ -5,11 +5,15 @@ export interface LcbProductProps {
5
5
  imageRadius?: number
6
6
  borderRadius?: number
7
7
  itemWidth?: number
8
- items?: Record<string, any>[]
8
+ items?: {
9
+ productId: string
10
+ [key: string]: any
11
+ }[]
9
12
  form?: Record<string, any>
10
13
  layoutType?: 'vertical' | 'horizontal'
11
14
  titleLineClamp?: number
12
15
  coverImgStyle?: Record<string, any>
16
+ filterList?: boolean
13
17
  renderItemAbsoluteConfigLayout?: {
14
18
  dataset?: Record<string, any>
15
19
  blocks: any[]