@tplc/business 0.4.82 → 0.4.84

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,42 @@
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.4.84](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.82...v0.4.84) (2025-04-30)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.4.83 ([ae16ad2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ae16ad2141431e101ec52b3c63d902eb0f26cd68))
11
+
12
+
13
+ ### 🐛 Bug Fixes | Bug 修复
14
+
15
+ * 修改商品展示 ([8d3ef34](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8d3ef34a8693fa3a5a3c89fd99c2ac3aa8ac195f))
16
+
17
+
18
+ ### ✨ Features | 新功能
19
+
20
+ * horizontal 支持gap ([8d5d3c8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8d5d3c8732b1adb6dc9afd2e5c51836a58573c8b))
21
+ * 价格居中 ([91dd0e9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/91dd0e96048f3a26f9c990e04dc07ce5c08377c9))
22
+ * 支持分享 ([841c723](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/841c72301546c1e5ad4fe4010e53b7fbef79ffa3))
23
+ * 调整布局 ([4a95740](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4a957408f27e2555c1078994cca20712e7be7003))
24
+
25
+ ### [0.4.83](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.79...v0.4.83) (2025-04-29)
26
+
27
+
28
+ ### 🚀 Chore | 构建/工程依赖/工具
29
+
30
+ * **release:** 0.4.80 ([46fb687](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/46fb6871903902d843b95d888dd4d7dde93f6016))
31
+ * **release:** 0.4.81 ([dc2337a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dc2337ad8a773bf957fdcbe9537522763935f6ed))
32
+ * **release:** 0.4.82 ([2314a18](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2314a183177b2a18967549e59749b4c606ccdb85))
33
+
34
+
35
+ ### ✨ Features | 新功能
36
+
37
+ * PAGE_DYNAMIC_DATA ([815d9de](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/815d9ded9a4b6b55893104198a2e569d39036ea8))
38
+ * 支持scope ([22fc204](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/22fc2049e6c5af088ff333ce4152959404b914bb))
39
+ * 支持分享 ([841c723](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/841c72301546c1e5ad4fe4010e53b7fbef79ffa3))
40
+
5
41
  ### [0.4.82](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.81...v0.4.82) (2025-04-29)
6
42
 
7
43
 
@@ -93,6 +93,7 @@ const props = withDefaults(defineProps<LcbListProps>(), {
93
93
  mode: 'list',
94
94
  imageWidth: 250,
95
95
  titleLineClamp: 2,
96
+ gap: 16,
96
97
  // @ts-ignore
97
98
  pageListProps: () => ({
98
99
  productProps: {
@@ -18,6 +18,7 @@ export interface LcbListProps extends LcbBlockProps {
18
18
  imageRadius?: number
19
19
  itemWidth?: number // 列表项宽度
20
20
  dynamicScope?: string
21
+ gap?: number
21
22
  }
22
23
  export interface Option {
23
24
  label: string
@@ -28,6 +28,7 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
28
28
  paddingHorizontal: 24,
29
29
  paddingVertical: 24,
30
30
  sourceMode: 1,
31
+ gap: 16,
31
32
  })
32
33
  const { form } = useSyncForm(props.dynamicScope)
33
34
  const renderList = ref<Record<string, any>[]>([])
@@ -76,14 +77,14 @@ const getData = async () => {
76
77
  }
77
78
  }
78
79
  watch(
79
- () => form.value,
80
- () => {
80
+ () => form!.value,
81
+ (oldValue = {}, newValue = {}) => {
81
82
  if (props.listType === 'waterfall') {
82
83
  renderList.value = []
83
84
  uWaterfallRef.value?.clear?.()
84
85
  }
85
86
  /** 如果是请求模式 */
86
- if (props.sourceMode === 2) {
87
+ if (props.sourceMode === 2 && JSON.stringify(oldValue) !== JSON.stringify(newValue)) {
87
88
  getData()
88
89
  }
89
90
  },
@@ -146,14 +147,15 @@ defineExpose({
146
147
  shadowSize: blockShadowSize,
147
148
  blurSize: blockBlurSize,
148
149
  }"
149
- :custom-class="`${listType == 'horizontal' ? 'h-fit overflow-x-auto whitespace-nowrap flex items-stretch w-full' : ''}`"
150
+ :custom-class="`${listType == 'horizontal' ? '!gap-0 h-fit overflow-x-auto whitespace-nowrap flex items-stretch w-full' : ''}`"
150
151
  >
151
152
  <!-- 单列 -->
152
153
  <view
153
- class="flex flex-col gap-2"
154
+ class="flex flex-col"
154
155
  v-if="listType === 'list'"
155
156
  :style="{
156
157
  width: itemWidth ? `${itemWidth}rpx` : '100%',
158
+ gap: gap ? `${gap}rpx` : undefined,
157
159
  }"
158
160
  >
159
161
  <block v-for="(item, index) in renderList" :key="`${item?.productId}:${index}`">
@@ -190,10 +192,11 @@ defineExpose({
190
192
  </view>
191
193
  <!-- 双列 -->
192
194
  <view
193
- class="grid grid-cols-2 box-border gap-2"
195
+ class="grid grid-cols-2 box-border"
194
196
  v-else-if="listType === 'grid'"
195
197
  :style="{
196
198
  width: itemWidth ? `${itemWidth}rpx` : '100%',
199
+ gap: gap ? `${gap}rpx` : undefined,
197
200
  }"
198
201
  >
199
202
  <lcb-action-view
@@ -236,9 +239,14 @@ defineExpose({
236
239
  width: itemWidth ? `${itemWidth}rpx` : '100%',
237
240
  }"
238
241
  >
239
- <u-waterfall :addTime="0" :modelValue="renderList" ref="uWaterfallRef">
242
+ <u-waterfall :addTime="0" :modelValue="renderList" ref="uWaterfallRef" custom-class="!gap-20">
240
243
  <template #left="{ leftList: list }">
241
- <view class="flex flex-col gap-3">
244
+ <view
245
+ class="flex flex-col gap-3"
246
+ :style="{
247
+ marginRight: `${gap / 2}rpx`,
248
+ }"
249
+ >
242
250
  <lcb-action-view
243
251
  v-for="(item, index) in list"
244
252
  :key="`${item?.productId}:${index}`"
@@ -259,7 +267,6 @@ defineExpose({
259
267
  <lcb-product-item
260
268
  v-bind="{ ...item, ...$props, ...attrs }"
261
269
  layoutType="vertical"
262
- tag-overflow-wrap
263
270
  v-else
264
271
  >
265
272
  <template #coverImg="{ value }">
@@ -283,7 +290,12 @@ defineExpose({
283
290
  </view>
284
291
  </template>
285
292
  <template #right="{ rightList: list }">
286
- <view class="flex flex-col gap-3">
293
+ <view
294
+ class="flex flex-col gap-3"
295
+ :style="{
296
+ marginLeft: `${gap / 2}rpx`,
297
+ }"
298
+ >
287
299
  <lcb-action-view
288
300
  v-for="(item, index) in list"
289
301
  :key="`${item?.productId}:${index}`"
@@ -304,7 +316,6 @@ defineExpose({
304
316
  v-else
305
317
  v-bind="{ ...item, ...$props, ...attrs }"
306
318
  layoutType="vertical"
307
- tag-overflow-wrap
308
319
  >
309
320
  <template #coverImg="{ value }">
310
321
  <wd-img
@@ -328,7 +339,7 @@ defineExpose({
328
339
  </template>
329
340
  </u-waterfall>
330
341
  </view>
331
-
342
+ <!-- 单列滚动 -->
332
343
  <template v-else-if="listType == 'horizontal'">
333
344
  <lcb-action-view
334
345
  v-for="(item, index) in renderList"
@@ -340,7 +351,7 @@ defineExpose({
340
351
  <view
341
352
  :style="{
342
353
  width: `${itemWidth}rpx`,
343
- marginLeft: index === 0 ? 0 : '24rpx',
354
+ marginLeft: index === 0 ? 0 : `${gap}rpx`,
344
355
  }"
345
356
  class="h-full"
346
357
  >
@@ -375,10 +386,9 @@ defineExpose({
375
386
 
376
387
  <style lang="scss" scoped>
377
388
  .lcb-product-waterfall {
378
- :deep(.u-waterfall) {
379
- display: flex;
380
- gap: 12px;
381
- }
389
+ // :deep(.u-waterfall) {
390
+ // gap: 12px;
391
+ // }
382
392
  :deep(.u-column) {
383
393
  overflow: initial;
384
394
  width: 0;
@@ -38,4 +38,5 @@ export interface LcbProductProps extends LcbBlockProps {
38
38
  }
39
39
  }
40
40
  dynamicScope?: string
41
+ gap?: number
41
42
  }
@@ -154,7 +154,7 @@ const coverImgWidth = computed(() => {
154
154
  itemProps.areaOnImg &&
155
155
  !itemProps.imgBottomIcon
156
156
  "
157
- class="flex absolute bottom-0 left-0 z-1 gap-1 p-2 w-full box-border text-white text-3.5 items-center"
157
+ class="flex absolute bottom-0 left-0 z-1 gap-1 p-1 w-full box-border text-white text-3.5 items-center text-shadow-xl"
158
158
  :style="{
159
159
  color: itemProps.areaColor,
160
160
  fontSize: `${itemProps.areaFontSize}rpx`,
@@ -216,7 +216,7 @@ const coverImgWidth = computed(() => {
216
216
  </view>
217
217
  </slot>
218
218
  <slot :value="value" v-else-if="prop === 'titleIcon'" name="titleIcon">
219
- <view :class="className" :style="style" class="inline-flex ml-1 align-text-top">
219
+ <view :class="className" :style="style" class="inline-flex ml-1 align-text-top items-center">
220
220
  <wd-img :src="itemProps.titleIcon" width="12px" height="12px" />
221
221
  </view>
222
222
  </slot>
@@ -320,7 +320,7 @@ const coverImgWidth = computed(() => {
320
320
  :value="value"
321
321
  class="text-price font-bold text-27rpx"
322
322
  >
323
- <view>{{ value }}</view>
323
+ {{ value }}
324
324
  </view>
325
325
  </slot>
326
326
 
@@ -339,8 +339,8 @@ const coverImgWidth = computed(() => {
339
339
 
340
340
  <!-- 价格后缀 -->
341
341
  <slot :value="value" v-else-if="prop === 'priceSuffix'" name="priceSuffix">
342
- <view :class="className" :style="style" class="text-22rpx">
343
- <view>{{ value }}</view>
342
+ <view :class="className" :style="style" class="text-22rpx leading-normal">
343
+ {{ value }}
344
344
  </view>
345
345
  </slot>
346
346
 
@@ -144,12 +144,12 @@ const itemStyle = computed(() => {
144
144
  <ItemValue prop="productName">
145
145
  <!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
146
146
  </ItemValue>
147
- <ItemValue prop="titleIcon">
148
- <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
149
- </ItemValue>
150
147
  <ItemValue prop="level">
151
148
  <!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
152
149
  </ItemValue>
150
+ <ItemValue prop="titleIcon">
151
+ <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
152
+ </ItemValue>
153
153
  </view>
154
154
 
155
155
  <view class="flex gap-1 items-center">
@@ -222,18 +222,11 @@ const itemStyle = computed(() => {
222
222
  </template>
223
223
  </view>
224
224
  <view class="flex gap-[4rpx] items-end" v-if="priceVisible && isNumber(price)">
225
- <template v-for="propName in ['priceUnit', 'price', 'priceSuffix']" :key="propName">
226
- <ItemValue :prop="propName" v-if="!!$slots?.[propName]">
227
- <template #price="{ value }"><slot name="price" :value="value" /></template>
228
- <template #priceUnit="{ value }">
229
- <slot name="priceUnit" :value="value" />
230
- </template>
231
- <template #priceSuffix="{ value }">
232
- <slot name="priceSuffix" :value="value" />
233
- </template>
234
- </ItemValue>
235
- <ItemValue :prop="propName" v-else />
236
- </template>
225
+ <ItemValue prop="priceUnit" />
226
+ <view class="flex items-center justify-center gap-0.5">
227
+ <ItemValue prop="price" />
228
+ <ItemValue prop="priceSuffix" />
229
+ </view>
237
230
  </view>
238
231
  </view>
239
232
  <ItemValue prop="priceTips">
@@ -283,16 +276,17 @@ const itemStyle = computed(() => {
283
276
  <view class="p-2 flex flex-col flex-1 text-26rpx overflow-hidden relative">
284
277
  <slot name="contentSection" />
285
278
  <view class="flex flex-col gap-[5px] overflow-hidden">
286
- <view class="text-ellipsis line-clamp-2 flex flex-wrap">
279
+ <view>
287
280
  <ItemValue prop="productName">
288
281
  <!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
289
282
  </ItemValue>
290
- <ItemValue prop="titleIcon">
291
- <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
292
- </ItemValue>
283
+
293
284
  <ItemValue prop="level">
294
285
  <!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
295
286
  </ItemValue>
287
+ <ItemValue prop="titleIcon">
288
+ <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
289
+ </ItemValue>
296
290
  </view>
297
291
 
298
292
  <view class="flex gap-1 items-center">
@@ -344,37 +338,16 @@ const itemStyle = computed(() => {
344
338
  class="flex gap-[2rpx] items-end line-through"
345
339
  v-if="scribePriceVisible && isNumber(scribePrice)"
346
340
  >
347
- <template
348
- v-for="propName in ['scribePriceUnit', 'scribePrice', 'scribePriceSuffix']"
349
- :key="propName"
350
- >
351
- <ItemValue :prop="propName" v-if="!!$slots?.[propName]">
352
- <template #scribePrice="{ value }">
353
- <slot name="scribePrice" :value="value" />
354
- </template>
355
- <template #scribePriceUnit="{ value }">
356
- <slot name="scribePriceUnit" :value="value" />
357
- </template>
358
- <template #scribePriceSuffix="{ value }">
359
- <slot name="scribePriceSuffix" :value="value" />
360
- </template>
361
- </ItemValue>
362
- <ItemValue :prop="propName" v-else />
363
- </template>
341
+ <ItemValue prop="scribePriceUnit" />
342
+ <ItemValue prop="scribePrice" />
343
+ <ItemValue prop="scribePriceSuffix" />
364
344
  </view>
365
- <view class="flex gap-[4rpx] items-end" v-if="priceVisible && isNumber(price)">
366
- <template v-for="propName in ['priceUnit', 'price', 'priceSuffix']" :key="propName">
367
- <ItemValue :prop="propName" v-if="!!$slots?.[propName]">
368
- <template #price="{ value }"><slot name="price" :value="value" /></template>
369
- <template #priceUnit="{ value }">
370
- <slot name="priceUnit" :value="value" />
371
- </template>
372
- <template #priceSuffix="{ value }">
373
- <slot name="priceSuffix" :value="value" />
374
- </template>
375
- </ItemValue>
376
- <ItemValue :prop="propName" v-else />
377
- </template>
345
+ <view class="flex gap-0.5 items-end" v-if="priceVisible && isNumber(price)">
346
+ <ItemValue prop="priceUnit" />
347
+ <view class="flex items-center justify-center gap-0.5">
348
+ <ItemValue prop="price" />
349
+ <ItemValue prop="priceSuffix" />
350
+ </view>
378
351
  </view>
379
352
  </view>
380
353
  <ItemValue prop="priceTips">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.82",
3
+ "version": "0.4.84",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -59,6 +59,7 @@ declare const __VLS_component: import('vue').DefineComponent<
59
59
  | 'bottom-left'
60
60
  | 'bottom-center'
61
61
  | 'bottom-right'
62
+ gap: number
62
63
  imageWidth: number
63
64
  borderRadius: number
64
65
  imageHeight: number
@@ -17,6 +17,7 @@ export interface LcbListProps extends LcbBlockProps {
17
17
  imageRadius?: number
18
18
  itemWidth?: number
19
19
  dynamicScope?: string
20
+ gap?: number
20
21
  }
21
22
  export interface Option {
22
23
  label: string
@@ -16,6 +16,7 @@ declare const __VLS_component: import('vue').DefineComponent<
16
16
  paddingHorizontal: number
17
17
  paddingVertical: number
18
18
  sourceMode: number
19
+ gap: number
19
20
  }
20
21
  >,
21
22
  {
@@ -42,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<
42
43
  paddingHorizontal: number
43
44
  paddingVertical: number
44
45
  sourceMode: number
46
+ gap: number
45
47
  }
46
48
  >
47
49
  >
@@ -49,6 +51,7 @@ declare const __VLS_component: import('vue').DefineComponent<
49
51
  {
50
52
  paddingHorizontal: number
51
53
  paddingVertical: number
54
+ gap: number
52
55
  column: number
53
56
  imageWidth: number
54
57
  imageHeight: number
@@ -35,4 +35,5 @@ export interface LcbProductProps extends LcbBlockProps {
35
35
  }
36
36
  }
37
37
  dynamicScope?: string
38
+ gap?: number
38
39
  }
@@ -175,9 +175,9 @@ declare const __VLS_component: import('vue').DefineComponent<
175
175
  borderRadius: number
176
176
  titleLineClamp: number
177
177
  layoutType: 'vertical' | 'horizontal'
178
- tagOverflowWrap: boolean
179
178
  priceUnit: any
180
179
  scribePriceUnit: any
180
+ tagOverflowWrap: boolean
181
181
  tagType: import('@tplc/wot/components/wd-tag/types').TagType
182
182
  tagPlain: boolean
183
183
  tagMark: boolean