@tplc/business 0.4.74 → 0.4.76
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 +28 -0
- package/components/lcb-list/components/UnconditionedLayout/index.vue +5 -3
- package/components/lcb-product-item/components/ItemValue.vue +45 -23
- package/components/lcb-product-item/types.ts +4 -0
- package/package.json +2 -2
- package/types/components/lcb-product-item/types.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.76](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.83...v0.4.76) (2025-04-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* banner 支持video ([8dbe21d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8dbe21d2d8705f6ae50a30e84f4dc50dcbd0b85d))
|
|
11
|
+
|
|
12
|
+
### [0.4.75](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.82...v0.4.75) (2025-04-25)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
16
|
+
|
|
17
|
+
* **release:** 0.4.73 ([0d4a942](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d4a942c1cbe39d7edc4e7b9d2eebb35776d269c))
|
|
18
|
+
* **release:** 0.4.74 ([40440ff](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/40440ffaacfe3ad3305a591470940c4ab80eef67))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ✨ Features | 新功能
|
|
22
|
+
|
|
23
|
+
* 兼容h5 ([0f89d4e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f89d4e59e1fbe73da2abdf420e6dd7d53967262))
|
|
24
|
+
* 兼容图片 ([dd37ec7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dd37ec75663ceb4cf1821284f05bb0278a88a870))
|
|
25
|
+
* 兼容过滤 ([6a756d1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6a756d16a75a1e454063e880ac1cfeb2042136a4))
|
|
26
|
+
* 新增tabs字体粗细 ([314c20b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/314c20b7f512b7a7285b3543494e69e24b23d5b1))
|
|
27
|
+
* 更新版本 ([4758810](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4758810119e5e47d2f705875b8ed4ba6f971046a))
|
|
28
|
+
* 调整fitler ([e67ce6c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e67ce6c0eebf1b44264b6e6589d35b383a99a5f9))
|
|
29
|
+
* 调整form底部层级 ([0f0dffb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f0dffb074033d4c270c7222c5ec4d76e172c374))
|
|
30
|
+
* 调整图片尺寸 ([55e45aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/55e45aa30a4f3ec4a260f8b6b9b70253e3baadd4))
|
|
31
|
+
* 调整布局 ([4025835](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4025835a804275eaff4ec6b26ef8c5cc2c2d822d))
|
|
32
|
+
|
|
5
33
|
### [0.4.74](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.73...v0.4.74) (2025-04-20)
|
|
6
34
|
|
|
7
35
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script lang="ts" setup>
|
|
51
|
-
import { ListFormChooserValues } from '../../types'
|
|
51
|
+
import { ListFormChooserValues, Option } from '../../types'
|
|
52
52
|
import { LIST_FORM_CHOOSER_VALUES, FORM_KEY } from '../../../../constants'
|
|
53
53
|
import { Ref, computed, inject } from 'vue'
|
|
54
54
|
import { transformValueUnit } from '../../../../utils/transform'
|
|
@@ -103,11 +103,13 @@ const options = computed(() => {
|
|
|
103
103
|
.map((v) => {
|
|
104
104
|
return {
|
|
105
105
|
key: v,
|
|
106
|
-
options: list.value[v],
|
|
106
|
+
options: checkOptions(list.value[v]),
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
})
|
|
110
|
-
|
|
110
|
+
const checkOptions = (options: Option[] = []) => {
|
|
111
|
+
return options.filter((v) => v.label && !['不限', '自定义'].includes(v.label))
|
|
112
|
+
}
|
|
111
113
|
/**
|
|
112
114
|
* 移除单个标签
|
|
113
115
|
*/
|
|
@@ -145,12 +145,25 @@ const coverImgWidth = computed(() => {
|
|
|
145
145
|
mode="heightFix"
|
|
146
146
|
/>
|
|
147
147
|
</view>
|
|
148
|
+
<!-- area -->
|
|
149
|
+
<!-- && itemProps.areaOnImg -->
|
|
150
|
+
<view
|
|
151
|
+
v-if="itemProps.showArea && itemAttrs.cityArea && itemProps.areaOnImg"
|
|
152
|
+
class="absolute bottom-0 left-0 z-1 p-2 line-clamp-1 w-full box-border text-white text-3.5"
|
|
153
|
+
:style="{
|
|
154
|
+
color: itemProps.areaColor,
|
|
155
|
+
fontSize: `${itemProps.areaFontSize}rpx`,
|
|
156
|
+
}"
|
|
157
|
+
>
|
|
158
|
+
<wd-icon name="location"></wd-icon>
|
|
159
|
+
{{ itemAttrs.cityArea }}
|
|
160
|
+
</view>
|
|
148
161
|
<slot></slot>
|
|
149
162
|
</view>
|
|
150
163
|
</block>
|
|
151
164
|
|
|
152
165
|
<!-- 标题 -->
|
|
153
|
-
<slot :value="value" v-if="prop === 'productName'" name="productName">
|
|
166
|
+
<slot :value="value" v-else-if="prop === 'productName'" name="productName">
|
|
154
167
|
<view
|
|
155
168
|
:class="[
|
|
156
169
|
className,
|
|
@@ -160,11 +173,20 @@ const coverImgWidth = computed(() => {
|
|
|
160
173
|
:style="style"
|
|
161
174
|
:value="value"
|
|
162
175
|
>
|
|
163
|
-
{{ value }}
|
|
176
|
+
{{ value }}
|
|
177
|
+
<text
|
|
178
|
+
v-if="itemProps.showArea && !itemProps.areaOnImg && itemAttrs.cityArea"
|
|
179
|
+
:style="{
|
|
180
|
+
color: itemProps.areaColor,
|
|
181
|
+
fontSize: `${itemProps.areaFontSize}rpx`,
|
|
182
|
+
}"
|
|
183
|
+
>
|
|
184
|
+
{{ `(${itemAttrs.cityArea})` }}
|
|
185
|
+
</text>
|
|
164
186
|
</view>
|
|
165
187
|
</slot>
|
|
166
188
|
|
|
167
|
-
<slot :value="value" v-if="prop === 'level' && value && Number(value)" name="level">
|
|
189
|
+
<slot :value="value" v-else-if="prop === 'level' && value && Number(value)" name="level">
|
|
168
190
|
<view
|
|
169
191
|
:class="className"
|
|
170
192
|
:style="style"
|
|
@@ -180,32 +202,32 @@ const coverImgWidth = computed(() => {
|
|
|
180
202
|
/>
|
|
181
203
|
</view>
|
|
182
204
|
</slot>
|
|
183
|
-
<slot :value="value" v-if="prop === 'titleIcon'" name="titleIcon">
|
|
205
|
+
<slot :value="value" v-else-if="prop === 'titleIcon'" name="titleIcon">
|
|
184
206
|
<view :class="className" :style="style" class="inline-flex ml-1 align-text-top">
|
|
185
207
|
<wd-img :src="itemProps.titleIcon" width="12px" height="12px" />
|
|
186
208
|
</view>
|
|
187
209
|
</slot>
|
|
188
210
|
|
|
189
|
-
<slot :value="value" v-if="prop === 'scoreAvg'" name="scoreAvg">
|
|
211
|
+
<slot :value="value" v-else-if="prop === 'scoreAvg'" name="scoreAvg">
|
|
190
212
|
<view :class="`px-1.5 rounded bg-primary text-3 text-white ${className}`" :style="style">
|
|
191
213
|
{{ value.toFixed(1) }}
|
|
192
214
|
</view>
|
|
193
215
|
</slot>
|
|
194
216
|
|
|
195
|
-
<slot :value="value" v-if="prop === 'scoreTips'" name="scoreTips">
|
|
217
|
+
<slot :value="value" v-else-if="prop === 'scoreTips'" name="scoreTips">
|
|
196
218
|
<view :class="className" :style="style" class="text-primary font-bold">
|
|
197
219
|
<view>{{ value }}</view>
|
|
198
220
|
</view>
|
|
199
221
|
</slot>
|
|
200
222
|
|
|
201
|
-
<slot :value="value" v-if="prop === 'userInteractionInfo'" name="userInteractionInfo">
|
|
223
|
+
<slot :value="value" v-else-if="prop === 'userInteractionInfo'" name="userInteractionInfo">
|
|
202
224
|
<view :class="className" :style="style" class="text-ellipsis line-clamp-1 flex-1">
|
|
203
225
|
<view>{{ value }}</view>
|
|
204
226
|
</view>
|
|
205
227
|
</slot>
|
|
206
228
|
|
|
207
229
|
<!-- 副标题 -->
|
|
208
|
-
<slot :value="value" v-if="prop === 'subTitle'" name="subTitle">
|
|
230
|
+
<slot :value="value" v-else-if="prop === 'subTitle'" name="subTitle">
|
|
209
231
|
<view
|
|
210
232
|
:class="className"
|
|
211
233
|
:style="style"
|
|
@@ -217,7 +239,7 @@ const coverImgWidth = computed(() => {
|
|
|
217
239
|
</slot>
|
|
218
240
|
|
|
219
241
|
<!-- 位置 -->
|
|
220
|
-
<slot :value="value" v-if="prop === 'addressIntro'" name="addressIntro">
|
|
242
|
+
<slot :value="value" v-else-if="prop === 'addressIntro'" name="addressIntro">
|
|
221
243
|
<view
|
|
222
244
|
:class="className"
|
|
223
245
|
:style="style"
|
|
@@ -229,7 +251,7 @@ const coverImgWidth = computed(() => {
|
|
|
229
251
|
</slot>
|
|
230
252
|
|
|
231
253
|
<!-- 距离 -->
|
|
232
|
-
<slot :value="value" v-if="prop === 'distance'" name="distance">
|
|
254
|
+
<slot :value="value" v-else-if="prop === 'distance'" name="distance">
|
|
233
255
|
<view
|
|
234
256
|
:class="className"
|
|
235
257
|
:style="style"
|
|
@@ -243,7 +265,7 @@ const coverImgWidth = computed(() => {
|
|
|
243
265
|
</slot>
|
|
244
266
|
|
|
245
267
|
<!-- 标签 -->
|
|
246
|
-
<slot :value="value" v-if="prop === 'tags'" name="tags">
|
|
268
|
+
<slot :value="value" v-else-if="prop === 'tags'" name="tags">
|
|
247
269
|
<view
|
|
248
270
|
:class="[
|
|
249
271
|
'flex gap-1',
|
|
@@ -271,14 +293,14 @@ const coverImgWidth = computed(() => {
|
|
|
271
293
|
</slot>
|
|
272
294
|
|
|
273
295
|
<!-- 价格单位 -->
|
|
274
|
-
<slot :value="value" v-if="prop === 'priceUnit'" name="priceUnit">
|
|
296
|
+
<slot :value="value" v-else-if="prop === 'priceUnit'" name="priceUnit">
|
|
275
297
|
<view :class="className" :style="style" class="text-price font-bold text-22rpx">
|
|
276
298
|
<view>{{ value }}</view>
|
|
277
299
|
</view>
|
|
278
300
|
</slot>
|
|
279
301
|
|
|
280
302
|
<!-- 价格 -->
|
|
281
|
-
<slot :value="value" v-if="prop === 'price'" name="price">
|
|
303
|
+
<slot :value="value" v-else-if="prop === 'price'" name="price">
|
|
282
304
|
<view
|
|
283
305
|
:class="className"
|
|
284
306
|
:style="style"
|
|
@@ -290,7 +312,7 @@ const coverImgWidth = computed(() => {
|
|
|
290
312
|
</slot>
|
|
291
313
|
|
|
292
314
|
<!-- 价格标签 -->
|
|
293
|
-
<slot :value="value" v-if="prop === 'priceTips'" name="priceTips">
|
|
315
|
+
<slot :value="value" v-else-if="prop === 'priceTips'" name="priceTips">
|
|
294
316
|
<view
|
|
295
317
|
:class="className"
|
|
296
318
|
:style="style"
|
|
@@ -303,52 +325,52 @@ const coverImgWidth = computed(() => {
|
|
|
303
325
|
</slot>
|
|
304
326
|
|
|
305
327
|
<!-- 价格后缀 -->
|
|
306
|
-
<slot :value="value" v-if="prop === 'priceSuffix'" name="priceSuffix">
|
|
328
|
+
<slot :value="value" v-else-if="prop === 'priceSuffix'" name="priceSuffix">
|
|
307
329
|
<view :class="className" :style="style" class="text-22rpx">
|
|
308
330
|
<view>{{ value }}</view>
|
|
309
331
|
</view>
|
|
310
332
|
</slot>
|
|
311
333
|
|
|
312
334
|
<!-- 原始价格单位 -->
|
|
313
|
-
<slot :value="value" v-if="prop === 'scribePriceUnit'" name="scribePriceUnit">
|
|
335
|
+
<slot :value="value" v-else-if="prop === 'scribePriceUnit'" name="scribePriceUnit">
|
|
314
336
|
<view :class="className" :style="style" class="text-#969696 font-bold text-19rpx">
|
|
315
337
|
<view>{{ value }}</view>
|
|
316
338
|
</view>
|
|
317
339
|
</slot>
|
|
318
340
|
|
|
319
341
|
<!-- 原始价格 -->
|
|
320
|
-
<slot :value="value" v-if="prop === 'scribePrice'" name="scribePrice">
|
|
342
|
+
<slot :value="value" v-else-if="prop === 'scribePrice'" name="scribePrice">
|
|
321
343
|
<view :class="className" :style="style" class="text-#969696 font-bold text-20rpx">
|
|
322
344
|
<view>{{ value }}</view>
|
|
323
345
|
</view>
|
|
324
346
|
</slot>
|
|
325
347
|
|
|
326
348
|
<!-- 原始价格后缀 -->
|
|
327
|
-
<slot :value="value" v-if="prop === 'scribePriceSuffix'" name="scribePriceSuffix">
|
|
349
|
+
<slot :value="value" v-else-if="prop === 'scribePriceSuffix'" name="scribePriceSuffix">
|
|
328
350
|
<view :class="className" :style="style" class="text-#969696 text-20rpx">
|
|
329
351
|
<view>{{ value }}</view>
|
|
330
352
|
</view>
|
|
331
353
|
</slot>
|
|
332
354
|
|
|
333
|
-
<slot :value="value" v-if="prop === 'orderTips'" name="orderTips">
|
|
355
|
+
<slot :value="value" v-else-if="prop === 'orderTips'" name="orderTips">
|
|
334
356
|
<view :class="className" :style="style" class="text-22rpx text-#969696">
|
|
335
357
|
<view>{{ value }}</view>
|
|
336
358
|
</view>
|
|
337
359
|
</slot>
|
|
338
|
-
<slot :value="value" v-if="prop === 'orderSkuCountTips'" name="orderSkuCountTips">
|
|
360
|
+
<slot :value="value" v-else-if="prop === 'orderSkuCountTips'" name="orderSkuCountTips">
|
|
339
361
|
<view :class="className" :style="style" class="text-22rpx text-#969696 flex items-center">
|
|
340
362
|
<view>{{ value }}</view>
|
|
341
363
|
</view>
|
|
342
364
|
</slot>
|
|
343
365
|
|
|
344
|
-
<slot :value="value" v-if="prop === 'distanceTips'" name="distanceTips">
|
|
366
|
+
<slot :value="value" v-else-if="prop === 'distanceTips'" name="distanceTips">
|
|
345
367
|
<view :class="className" :style="style" class="text-22rpx text-#969696 flex items-center">
|
|
346
368
|
<wd-icon name="location" />
|
|
347
369
|
<view>{{ value }}</view>
|
|
348
370
|
</view>
|
|
349
371
|
</slot>
|
|
350
372
|
|
|
351
|
-
<slot :value="value" v-if="prop === 'headImg'" name="headImg">
|
|
373
|
+
<slot :value="value" v-else-if="prop === 'headImg'" name="headImg">
|
|
352
374
|
<img
|
|
353
375
|
:src="value + `?x-oss-process=image/resize,m_mfit,w_${64}&imageView2/2/w/${64}`"
|
|
354
376
|
class="block w-4 h-4 rounded-full"
|
|
@@ -357,7 +379,7 @@ const coverImgWidth = computed(() => {
|
|
|
357
379
|
mode="aspectFill"
|
|
358
380
|
/>
|
|
359
381
|
</slot>
|
|
360
|
-
<slot :value="value" v-if="prop === 'userName'" name="userName">
|
|
382
|
+
<slot :value="value" v-else-if="prop === 'userName'" name="userName">
|
|
361
383
|
<view
|
|
362
384
|
:class="className"
|
|
363
385
|
:style="style"
|
|
@@ -7,6 +7,10 @@ export interface LcbProductItemProps {
|
|
|
7
7
|
layoutType?: 'vertical' | 'horizontal'
|
|
8
8
|
titleLineClamp?: number
|
|
9
9
|
showArea?: string
|
|
10
|
+
// area在图片上面
|
|
11
|
+
areaOnImg?: boolean
|
|
12
|
+
areaColor?: string
|
|
13
|
+
areaFontSize?: number
|
|
10
14
|
tagOverflowWrap?: boolean
|
|
11
15
|
tagType?: TagType
|
|
12
16
|
tagContentColor?: string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.76",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"业务组件"
|
|
6
6
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": ">=3.2.47",
|
|
14
|
-
"@tplc/wot": "0.1.
|
|
14
|
+
"@tplc/wot": "0.1.83"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -5,6 +5,9 @@ export interface LcbProductItemProps {
|
|
|
5
5
|
layoutType?: 'vertical' | 'horizontal'
|
|
6
6
|
titleLineClamp?: number
|
|
7
7
|
showArea?: string
|
|
8
|
+
areaOnImg?: boolean
|
|
9
|
+
areaColor?: string
|
|
10
|
+
areaFontSize?: number
|
|
8
11
|
tagOverflowWrap?: boolean
|
|
9
12
|
tagType?: TagType
|
|
10
13
|
tagContentColor?: string
|