@tplc/business 0.2.37 → 0.2.39

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,31 @@
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.39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.46...v0.2.39) (2024-12-27)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.1.47 ([b785621](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b78562141021c6b4ed0568765004f6e4bc55fa32))
11
+ * **release:** 0.2.37 ([19d81b9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/19d81b9d3f6022e1c8523b258bf7793a6d3b133a))
12
+ * **release:** 0.2.38 ([5acc214](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5acc214f80be26f5f80bdfe282918019b43315ae))
13
+
14
+
15
+ ### ✨ Features | 新功能
16
+
17
+ * calendar 尺寸 ([5670ca5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5670ca5fa482d9d0e57d32f15b9f7ab369210c3d))
18
+ * 图片支持渐进式 ([08523e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/08523e0eb244da1da3b46dca4d999360600edcf5))
19
+ * 增加 lcb-product-item 图片展示类型选择 ([24706b3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/24706b3e87aee2fc6d02961e35a82147974199c4))
20
+ * 支持头像昵称 ([a1061f0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a1061f0646637c797cdd2f5d9dbadd0862256398))
21
+ * 更新product ([3fb575b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3fb575b7be9ec92b10c3cd36d19ee9593999bb4a))
22
+
23
+ ### [0.2.38](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.47...v0.2.38) (2024-12-26)
24
+
25
+
26
+ ### ✨ Features | 新功能
27
+
28
+ * 图片支持渐进式 ([08523e0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/08523e0eb244da1da3b46dca4d999360600edcf5))
29
+
5
30
  ### [0.2.37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.31...v0.2.37) (2024-12-26)
6
31
 
7
32
 
@@ -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="{ ...attrs }" :listType="listType" :items="items" v-if="$slots.item">
35
+ <lcb-product
36
+ v-bind="{ ...attrs, form }"
37
+ :listType="listType"
38
+ :items="items"
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="{ ...attrs }" :listType="listType" :items="items" v-else></lcb-product>
45
+ <lcb-product v-bind="{ ...attrs, form }" :listType="listType" :items="items" v-else />
41
46
  </template>
42
47
  </FilterList>
43
48
  </template>
@@ -1,9 +1,10 @@
1
1
  <script setup lang="ts">
2
- import { computed, useAttrs } from 'vue'
2
+ import { ref, useAttrs, watch } from 'vue'
3
3
  import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
4
4
  import { LcbProductProps } from './types'
5
5
 
6
6
  const attrs = useAttrs()
7
+ const uWaterfallRef = ref()
7
8
  defineOptions({
8
9
  name: 'LcbProduct',
9
10
  options: {
@@ -22,6 +23,13 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
22
23
  defineSlots<{
23
24
  item(props: { item: any }): any
24
25
  }>()
26
+ watch(
27
+ () => props.form,
28
+ () => {
29
+ uWaterfallRef.value?.clear?.()
30
+ },
31
+ { deep: true },
32
+ )
25
33
  </script>
26
34
 
27
35
  <template>
@@ -51,33 +59,7 @@ defineSlots<{
51
59
  borderRadius: imageRadius ? `${imageRadius}rpx` : undefined,
52
60
  ...(attrs?.coverImgStyle ?? {}),
53
61
  }"
54
- >
55
- <!-- <template #itemTopSection>
56
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
57
- </template>
58
- <template #itemBottomSection>
59
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
60
- </template>
61
- <template #itemLeftSection>
62
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
63
- </template>
64
- <template #itemRightSection>
65
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
66
- </template> -->
67
-
68
- <!-- <template #imageSection>
69
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
70
- </template>
71
-
72
- <template #itemSection>
73
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
74
- </template>
75
- <template #contentSection>
76
- <view
77
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
78
- ></view>
79
- </template> -->
80
- </lcb-product-item>
62
+ ></lcb-product-item>
81
63
  </slot>
82
64
  </lcb-action-view>
83
65
  </view>
@@ -105,142 +87,83 @@ defineSlots<{
105
87
  height: imageHeight ?? `${imageHeightPercent}%`,
106
88
  ...(attrs?.coverImgStyle ?? {}),
107
89
  }"
108
- >
109
- <!-- <template #itemTopSection>
110
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
111
- </template>
112
- <template #itemBottomSection>
113
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
114
- </template>
115
- <template #itemLeftSection>
116
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
117
- </template>
118
- <template #itemRightSection>
119
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
120
- </template> -->
121
- </lcb-product-item>
90
+ ></lcb-product-item>
122
91
  </slot>
123
92
  </view>
124
93
  </view>
125
94
  </view>
126
95
  </view>
127
96
 
128
- <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" class="flex gap-3 p-3">
129
- <template #left="{ leftList: list }">
130
- <view class="flex flex-col gap-3">
131
- <view
132
- v-for="(item, index) in list"
133
- :key="`${item?.productId}:${index}`"
134
- class="rounded overflow-hidden"
135
- >
136
- <slot name="item" :item="item">
137
- <lcb-absolute-config-layout
138
- v-if="renderItemAbsoluteConfigLayout"
139
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
140
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
141
- :dataset="{
142
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
143
- ...item,
144
- }"
145
- />
146
- <lcb-product-item
147
- v-else
148
- v-bind="{ ...item, ...attrs }"
149
- layoutType="vertical"
150
- tag-overflow-wrap
151
- :title-line-clamp="2"
152
- >
153
- <template #coverImg="{ value }">
154
- <image :src="value" class="w-full" mode="widthFix" />
155
- </template>
156
- <!-- <template #itemTopSection>
157
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
158
- </template>
159
- <template #itemBottomSection>
160
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
161
- </template>
162
- <template #itemLeftSection>
163
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
164
- </template>
165
- <template #itemRightSection>
166
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
167
- </template> -->
168
-
169
- <!-- <template #imageSection>
170
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
171
- </template>
172
-
173
- <template #itemSection>
174
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
175
- </template>
176
- <template #contentSection>
177
- <view
178
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
179
- ></view>
180
- </template> -->
181
- </lcb-product-item>
182
- </slot>
97
+ <view class="lcb-product-waterfall">
98
+ <u-waterfall :modelValue="items" v-if="listType === 'waterfall'" ref="uWaterfallRef">
99
+ <template #left="{ leftList: list }">
100
+ <view class="flex flex-col gap-3">
101
+ <lcb-action-view
102
+ v-for="(item, index) in list"
103
+ :key="`${item?.productId}:${index}`"
104
+ custom-class="!rounded !overflow-hidden"
105
+ v-bind="item.link"
106
+ >
107
+ <slot name="item" :item="item">
108
+ <lcb-absolute-config-layout
109
+ v-if="renderItemAbsoluteConfigLayout"
110
+ :blocks="renderItemAbsoluteConfigLayout?.blocks"
111
+ :canvas="renderItemAbsoluteConfigLayout?.canvas"
112
+ :dataset="{
113
+ ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
114
+ ...item,
115
+ }"
116
+ />
117
+ <lcb-product-item
118
+ v-else
119
+ v-bind="{ ...item, ...attrs }"
120
+ layoutType="vertical"
121
+ tag-overflow-wrap
122
+ :title-line-clamp="2"
123
+ >
124
+ <template #coverImg="{ value }">
125
+ <image :src="value" class="w-full" mode="widthFix" />
126
+ </template>
127
+ </lcb-product-item>
128
+ </slot>
129
+ </lcb-action-view>
183
130
  </view>
184
- </view>
185
- </template>
186
- <template #right="{ rightList: list }">
187
- <view class="flex flex-col gap-3">
188
- <view
189
- v-for="(item, index) in list"
190
- :key="`${item?.productId}:${index}`"
191
- class="rounded overflow-hidden"
192
- >
193
- <slot name="item" :item="item">
194
- <lcb-absolute-config-layout
195
- v-if="renderItemAbsoluteConfigLayout"
196
- :blocks="renderItemAbsoluteConfigLayout?.blocks"
197
- :canvas="renderItemAbsoluteConfigLayout?.canvas"
198
- :dataset="{
199
- ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
200
- ...item,
201
- }"
202
- />
203
- <lcb-product-item
204
- v-else
205
- v-bind="{ ...item, ...attrs }"
206
- layoutType="vertical"
207
- tag-overflow-wrap
208
- :title-line-clamp="2"
209
- >
210
- <template #coverImg="{ value }">
211
- <image :src="value" class="w-full" mode="widthFix" />
212
- </template>
213
- <!-- <template #itemTopSection>
214
- <view class="min-w-10 min-h-10 bg-red-500/50"></view>
215
- </template>
216
- <template #itemBottomSection>
217
- <view class="min-w-10 min-h-10 bg-yellow-500/50"></view>
218
- </template>
219
- <template #itemLeftSection>
220
- <view class="min-w-10 min-h-10 bg-blue-500/50"></view>
221
- </template>
222
- <template #itemRightSection>
223
- <view class="min-w-10 min-h-10 bg-green-500/50"></view>
224
- </template> -->
225
-
226
- <!-- <template #imageSection>
227
- <view class="min-w-5 min-h-5 bg-yellow-400 right-1 top-1 absolute z-10"></view>
228
- </template>
229
-
230
- <template #itemSection>
231
- <view class="min-w-10 min-h-10 bg-blue-500/50 right-0 top-0 absolute z-10"></view>
232
- </template>
233
- <template #contentSection>
234
- <view
235
- class="min-w-15 min-h-15 bg-gray-500/20 right-10 top-10 absolute z-10 rounded-full"
236
- ></view>
237
- </template> -->
238
- </lcb-product-item>
239
- </slot>
131
+ </template>
132
+ <template #right="{ rightList: list }">
133
+ <view class="flex flex-col gap-3">
134
+ <lcb-action-view
135
+ v-for="(item, index) in list"
136
+ :key="`${item?.productId}:${index}`"
137
+ custom-class="!rounded !overflow-hidden"
138
+ v-bind="item.link"
139
+ >
140
+ <slot name="item" :item="item">
141
+ <lcb-absolute-config-layout
142
+ v-if="renderItemAbsoluteConfigLayout"
143
+ :blocks="renderItemAbsoluteConfigLayout?.blocks"
144
+ :canvas="renderItemAbsoluteConfigLayout?.canvas"
145
+ :dataset="{
146
+ ...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
147
+ ...item,
148
+ }"
149
+ />
150
+ <lcb-product-item
151
+ v-else
152
+ v-bind="{ ...item, ...attrs }"
153
+ layoutType="vertical"
154
+ tag-overflow-wrap
155
+ :title-line-clamp="2"
156
+ >
157
+ <template #coverImg="{ value }">
158
+ <image :src="value" class="w-full" mode="widthFix" />
159
+ </template>
160
+ </lcb-product-item>
161
+ </slot>
162
+ </lcb-action-view>
240
163
  </view>
241
- </view>
242
- </template>
243
- </u-waterfall>
164
+ </template>
165
+ </u-waterfall>
166
+ </view>
244
167
 
245
168
  <scroll-view v-if="listType == 'horizontal'" scroll-x>
246
169
  <view class="p-2 flex gap-2 whitespace-nowrap overflow-auto flex-nowrap">
@@ -267,4 +190,12 @@ defineSlots<{
267
190
  </lcb-block>
268
191
  </template>
269
192
 
270
- <style lang="scss" scoped></style>
193
+ <style lang="scss" scoped>
194
+ .lcb-product-waterfall {
195
+ :deep(.u-waterfall) {
196
+ display: flex;
197
+ gap: 24rpx;
198
+ padding: 24rpx;
199
+ }
200
+ }
201
+ </style>
@@ -8,6 +8,7 @@ export interface LcbProductProps {
8
8
  imageRadius?: number
9
9
  itemHeight?: number // 列表项高度
10
10
  items?: Record<string, any>[]
11
+ form?: Record<string, any>
11
12
  renderItemAbsoluteConfigLayout?: {
12
13
  dataset?: Record<string, any>
13
14
  blocks: any[]
@@ -23,6 +23,8 @@ const props = withDefaults(
23
23
  )
24
24
  defineSlots<{
25
25
  coverImg(props: { value: any }): any
26
+ headImg(props: { value: any }): any
27
+ userName(props: { value: any }): any
26
28
  productName(props: { value: any }): any
27
29
  subTitle(props: { value: any }): any
28
30
  price(props: { value: any }): any
@@ -76,7 +78,7 @@ const value = computed(() => {
76
78
  </script>
77
79
 
78
80
  <template>
79
- <template
81
+ <block
80
82
  v-if="
81
83
  visible && (prop === 'coverImg' || (!!value && (isArray(value) ? value?.length > 0 : true)))
82
84
  "
@@ -274,5 +276,15 @@ const value = computed(() => {
274
276
  <view>{{ value }}</view>
275
277
  </view>
276
278
  </slot>
277
- </template>
279
+ <slot :value="value" v-if="prop === 'headImg'" name="headImg">
280
+ <view :class="className" :style="style" class="w-4 h-4">
281
+ <wd-img :src="value" width="100%" height="100%" radius="50%" mode="aspectFill" />
282
+ </view>
283
+ </slot>
284
+ <slot :value="value" v-if="prop === 'userName'" name="userName">
285
+ <view :class="className" :style="style" class="text-20rpx text-#333 truncate">
286
+ <view>{{ value }}</view>
287
+ </view>
288
+ </slot>
289
+ </block>
278
290
  </template>
@@ -28,6 +28,7 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
28
28
  titleVisible: true,
29
29
  subTitleVisible: true,
30
30
  priceVisible: true,
31
+ userInfoVisible: false,
31
32
  priceTipsVisible: true,
32
33
  priceUnitVisible: true,
33
34
  priceSuffixVisible: true,
@@ -47,11 +48,12 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
47
48
  distanceVisible: true,
48
49
  })
49
50
  const attrs = useAttrs()
50
-
51
51
  provide('lcb-product-item-props', props)
52
52
 
53
53
  defineSlots<{
54
54
  coverImg(props: { value: any }): any
55
+ userName(props: { value: any }): any
56
+ headImg(props: { value: any }): any
55
57
  productName(props: { value: any }): any
56
58
  subTitle(props: { value: any }): any
57
59
  price(props: { value: any }): any
@@ -238,11 +240,15 @@ defineSlots<{
238
240
  </view>
239
241
  </view>
240
242
  <ItemValue prop="priceTips">
241
- <template #priceTips="{ value }">
243
+ <!-- <template #priceTips="{ value }">
242
244
  <slot name="priceTips" :value="value" />
243
- </template>
245
+ </template> -->
244
246
  </ItemValue>
245
247
  </view>
248
+ <view class="flex gap-2 items-center" v-if="userInfoVisible">
249
+ <ItemValue prop="headImg"></ItemValue>
250
+ <ItemValue prop="userName"></ItemValue>
251
+ </view>
246
252
  </view>
247
253
  <slot name="itemRightSection" />
248
254
  </view>
@@ -398,7 +404,12 @@ defineSlots<{
398
404
  </template>
399
405
  </ItemValue>
400
406
  </view>
407
+ <view class="flex gap-2 items-center" v-if="userInfoVisible">
408
+ <ItemValue prop="headImg"></ItemValue>
409
+ <ItemValue prop="userName"></ItemValue>
410
+ </view>
401
411
  </view>
412
+
402
413
  <slot name="itemBottomSection" />
403
414
  </view>
404
415
  <slot name="itemRightSection" />
@@ -18,6 +18,8 @@ export interface LcbProductItemProps {
18
18
 
19
19
  coverImg?: any
20
20
  productName?: any
21
+ headImg?: string
22
+ userName?: string
21
23
  subTitle?: any
22
24
  price?: any
23
25
  priceUnit?: any
@@ -41,6 +43,7 @@ export interface LcbProductItemProps {
41
43
  coverImgVisible?: boolean
42
44
  titleVisible?: boolean
43
45
  subTitleVisible?: boolean
46
+ userInfoVisible?: boolean
44
47
  priceVisible?: boolean
45
48
  priceUnitVisible?: boolean
46
49
  priceSuffixVisible?: boolean
@@ -16,7 +16,6 @@ defineOptions({
16
16
  },
17
17
  })
18
18
  const props = withDefaults(defineProps<LcbRichTextProps>(), {})
19
- console.log('props', props)
20
19
  </script>
21
20
 
22
21
  <style lang="scss" scoped></style>