@tplc/business 0.4.73 → 0.4.75

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,37 @@
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.75](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.82...v0.4.75) (2025-04-25)
6
+
7
+
8
+ ### 🚀 Chore | 构建/工程依赖/工具
9
+
10
+ * **release:** 0.4.73 ([0d4a942](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d4a942c1cbe39d7edc4e7b9d2eebb35776d269c))
11
+ * **release:** 0.4.74 ([40440ff](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/40440ffaacfe3ad3305a591470940c4ab80eef67))
12
+
13
+
14
+ ### ✨ Features | 新功能
15
+
16
+ * 兼容h5 ([0f89d4e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f89d4e59e1fbe73da2abdf420e6dd7d53967262))
17
+ * 兼容图片 ([dd37ec7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dd37ec75663ceb4cf1821284f05bb0278a88a870))
18
+ * 兼容过滤 ([6a756d1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6a756d16a75a1e454063e880ac1cfeb2042136a4))
19
+ * 新增tabs字体粗细 ([314c20b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/314c20b7f512b7a7285b3543494e69e24b23d5b1))
20
+ * 更新版本 ([4758810](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4758810119e5e47d2f705875b8ed4ba6f971046a))
21
+ * 调整fitler ([e67ce6c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e67ce6c0eebf1b44264b6e6589d35b383a99a5f9))
22
+ * 调整form底部层级 ([0f0dffb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f0dffb074033d4c270c7222c5ec4d76e172c374))
23
+ * 调整图片尺寸 ([55e45aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/55e45aa30a4f3ec4a260f8b6b9b70253e3baadd4))
24
+ * 调整布局 ([4025835](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4025835a804275eaff4ec6b26ef8c5cc2c2d822d))
25
+
26
+ ### [0.4.74](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.73...v0.4.74) (2025-04-20)
27
+
28
+
29
+ ### ✨ Features | 新功能
30
+
31
+ * 兼容h5 ([0f89d4e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0f89d4e59e1fbe73da2abdf420e6dd7d53967262))
32
+ * 调整fitler ([e67ce6c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e67ce6c0eebf1b44264b6e6589d35b383a99a5f9))
33
+ * 调整图片尺寸 ([55e45aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/55e45aa30a4f3ec4a260f8b6b9b70253e3baadd4))
34
+ * 调整布局 ([4025835](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4025835a804275eaff4ec6b26ef8c5cc2c2d822d))
35
+
5
36
  ### [0.4.73](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.72...v0.4.73) (2025-04-17)
6
37
 
7
38
 
@@ -6,7 +6,7 @@ export interface LcbListInfo {
6
6
  }
7
7
  export interface LcbFilterResult {
8
8
  btnComponent: BtnComponent
9
- filterTags: FilterTags
9
+ filterTags: FilterTags[]
10
10
  filterComponent: FilterComponent[]
11
11
  listInfo: LcbListInfo
12
12
  filterTabs?: {
@@ -63,12 +63,13 @@
63
63
  >
64
64
  <view class="flex gap-3.5 flex-1">
65
65
  <TagSelect
66
- v-if="info.filterTags"
66
+ v-for="tag in info.filterTags"
67
+ :key="tag.valueName"
67
68
  size="small"
68
- v-bind="info.filterTags.componentProps"
69
- v-model="filter[info.filterTags.valueName]"
70
- :value-name="info.filterTags.valueName"
71
- :sort-type="info.filterTags.sortType"
69
+ v-bind="tag.componentProps"
70
+ v-model="filter[tag.valueName]"
71
+ :value-name="tag.valueName"
72
+ :sort-type="tag.sortType"
72
73
  />
73
74
  </view>
74
75
  <wd-button v-if="info?.btnComponent" custom-class="!h-60rpx opacity-primary">
@@ -119,7 +120,10 @@ const onSubmit = (index: number, filterObj?: Record<string, any>) => {
119
120
  }
120
121
  const getSelect = (item: FilterComponent, index: number) => {
121
122
  if (item.component === 'componentGroup') {
122
- return item.componentProps.componentList?.some((v) => filter.value[v.valueName])
123
+ return item.componentProps.componentList?.some((v) => {
124
+ const value = filter.value[v.valueName]
125
+ return Array.isArray(value) ? value.length > 0 : Boolean(value)
126
+ })
123
127
  } else if (dynamicKeys.value[index]) {
124
128
  return dynamicKeys.value[index].some((v) => filter.value[v])
125
129
  } else {
@@ -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
  */
@@ -117,8 +117,10 @@ watch(
117
117
  }
118
118
  })
119
119
  if (data.filterTags) {
120
- initForm[data.filterTags.valueName] = data.filterTags.defaultValue
121
- titleObj.value[data.filterTags.valueName] = data.filterTags.defaultName
120
+ data.filterTags.forEach((item) => {
121
+ initForm[item.valueName] = item.defaultValue
122
+ titleObj.value[item.valueName] = item.defaultName
123
+ })
122
124
  }
123
125
  if (data.filterTabs) {
124
126
  initForm[data.filterTabs.valueName] =
@@ -150,7 +150,7 @@ const coverImgWidth = computed(() => {
150
150
  </block>
151
151
 
152
152
  <!-- 标题 -->
153
- <slot :value="value" v-if="prop === 'productName'" name="productName">
153
+ <slot :value="value" v-else-if="prop === 'productName'" name="productName">
154
154
  <view
155
155
  :class="[
156
156
  className,
@@ -164,7 +164,7 @@ const coverImgWidth = computed(() => {
164
164
  </view>
165
165
  </slot>
166
166
 
167
- <slot :value="value" v-if="prop === 'level' && value && Number(value)" name="level">
167
+ <slot :value="value" v-else-if="prop === 'level' && value && Number(value)" name="level">
168
168
  <view
169
169
  :class="className"
170
170
  :style="style"
@@ -180,32 +180,32 @@ const coverImgWidth = computed(() => {
180
180
  />
181
181
  </view>
182
182
  </slot>
183
- <slot :value="value" v-if="prop === 'titleIcon'" name="titleIcon">
183
+ <slot :value="value" v-else-if="prop === 'titleIcon'" name="titleIcon">
184
184
  <view :class="className" :style="style" class="inline-flex ml-1 align-text-top">
185
185
  <wd-img :src="itemProps.titleIcon" width="12px" height="12px" />
186
186
  </view>
187
187
  </slot>
188
188
 
189
- <slot :value="value" v-if="prop === 'scoreAvg'" name="scoreAvg">
189
+ <slot :value="value" v-else-if="prop === 'scoreAvg'" name="scoreAvg">
190
190
  <view :class="`px-1.5 rounded bg-primary text-3 text-white ${className}`" :style="style">
191
191
  {{ value.toFixed(1) }}
192
192
  </view>
193
193
  </slot>
194
194
 
195
- <slot :value="value" v-if="prop === 'scoreTips'" name="scoreTips">
195
+ <slot :value="value" v-else-if="prop === 'scoreTips'" name="scoreTips">
196
196
  <view :class="className" :style="style" class="text-primary font-bold">
197
197
  <view>{{ value }}</view>
198
198
  </view>
199
199
  </slot>
200
200
 
201
- <slot :value="value" v-if="prop === 'userInteractionInfo'" name="userInteractionInfo">
201
+ <slot :value="value" v-else-if="prop === 'userInteractionInfo'" name="userInteractionInfo">
202
202
  <view :class="className" :style="style" class="text-ellipsis line-clamp-1 flex-1">
203
203
  <view>{{ value }}</view>
204
204
  </view>
205
205
  </slot>
206
206
 
207
207
  <!-- 副标题 -->
208
- <slot :value="value" v-if="prop === 'subTitle'" name="subTitle">
208
+ <slot :value="value" v-else-if="prop === 'subTitle'" name="subTitle">
209
209
  <view
210
210
  :class="className"
211
211
  :style="style"
@@ -217,7 +217,7 @@ const coverImgWidth = computed(() => {
217
217
  </slot>
218
218
 
219
219
  <!-- 位置 -->
220
- <slot :value="value" v-if="prop === 'addressIntro'" name="addressIntro">
220
+ <slot :value="value" v-else-if="prop === 'addressIntro'" name="addressIntro">
221
221
  <view
222
222
  :class="className"
223
223
  :style="style"
@@ -229,7 +229,7 @@ const coverImgWidth = computed(() => {
229
229
  </slot>
230
230
 
231
231
  <!-- 距离 -->
232
- <slot :value="value" v-if="prop === 'distance'" name="distance">
232
+ <slot :value="value" v-else-if="prop === 'distance'" name="distance">
233
233
  <view
234
234
  :class="className"
235
235
  :style="style"
@@ -243,7 +243,7 @@ const coverImgWidth = computed(() => {
243
243
  </slot>
244
244
 
245
245
  <!-- 标签 -->
246
- <slot :value="value" v-if="prop === 'tags'" name="tags">
246
+ <slot :value="value" v-else-if="prop === 'tags'" name="tags">
247
247
  <view
248
248
  :class="[
249
249
  'flex gap-1',
@@ -271,14 +271,14 @@ const coverImgWidth = computed(() => {
271
271
  </slot>
272
272
 
273
273
  <!-- 价格单位 -->
274
- <slot :value="value" v-if="prop === 'priceUnit'" name="priceUnit">
274
+ <slot :value="value" v-else-if="prop === 'priceUnit'" name="priceUnit">
275
275
  <view :class="className" :style="style" class="text-price font-bold text-22rpx">
276
276
  <view>{{ value }}</view>
277
277
  </view>
278
278
  </slot>
279
279
 
280
280
  <!-- 价格 -->
281
- <slot :value="value" v-if="prop === 'price'" name="price">
281
+ <slot :value="value" v-else-if="prop === 'price'" name="price">
282
282
  <view
283
283
  :class="className"
284
284
  :style="style"
@@ -290,7 +290,7 @@ const coverImgWidth = computed(() => {
290
290
  </slot>
291
291
 
292
292
  <!-- 价格标签 -->
293
- <slot :value="value" v-if="prop === 'priceTips'" name="priceTips">
293
+ <slot :value="value" v-else-if="prop === 'priceTips'" name="priceTips">
294
294
  <view
295
295
  :class="className"
296
296
  :style="style"
@@ -303,52 +303,52 @@ const coverImgWidth = computed(() => {
303
303
  </slot>
304
304
 
305
305
  <!-- 价格后缀 -->
306
- <slot :value="value" v-if="prop === 'priceSuffix'" name="priceSuffix">
306
+ <slot :value="value" v-else-if="prop === 'priceSuffix'" name="priceSuffix">
307
307
  <view :class="className" :style="style" class="text-22rpx">
308
308
  <view>{{ value }}</view>
309
309
  </view>
310
310
  </slot>
311
311
 
312
312
  <!-- 原始价格单位 -->
313
- <slot :value="value" v-if="prop === 'scribePriceUnit'" name="scribePriceUnit">
313
+ <slot :value="value" v-else-if="prop === 'scribePriceUnit'" name="scribePriceUnit">
314
314
  <view :class="className" :style="style" class="text-#969696 font-bold text-19rpx">
315
315
  <view>{{ value }}</view>
316
316
  </view>
317
317
  </slot>
318
318
 
319
319
  <!-- 原始价格 -->
320
- <slot :value="value" v-if="prop === 'scribePrice'" name="scribePrice">
320
+ <slot :value="value" v-else-if="prop === 'scribePrice'" name="scribePrice">
321
321
  <view :class="className" :style="style" class="text-#969696 font-bold text-20rpx">
322
322
  <view>{{ value }}</view>
323
323
  </view>
324
324
  </slot>
325
325
 
326
326
  <!-- 原始价格后缀 -->
327
- <slot :value="value" v-if="prop === 'scribePriceSuffix'" name="scribePriceSuffix">
327
+ <slot :value="value" v-else-if="prop === 'scribePriceSuffix'" name="scribePriceSuffix">
328
328
  <view :class="className" :style="style" class="text-#969696 text-20rpx">
329
329
  <view>{{ value }}</view>
330
330
  </view>
331
331
  </slot>
332
332
 
333
- <slot :value="value" v-if="prop === 'orderTips'" name="orderTips">
333
+ <slot :value="value" v-else-if="prop === 'orderTips'" name="orderTips">
334
334
  <view :class="className" :style="style" class="text-22rpx text-#969696">
335
335
  <view>{{ value }}</view>
336
336
  </view>
337
337
  </slot>
338
- <slot :value="value" v-if="prop === 'orderSkuCountTips'" name="orderSkuCountTips">
338
+ <slot :value="value" v-else-if="prop === 'orderSkuCountTips'" name="orderSkuCountTips">
339
339
  <view :class="className" :style="style" class="text-22rpx text-#969696 flex items-center">
340
340
  <view>{{ value }}</view>
341
341
  </view>
342
342
  </slot>
343
343
 
344
- <slot :value="value" v-if="prop === 'distanceTips'" name="distanceTips">
344
+ <slot :value="value" v-else-if="prop === 'distanceTips'" name="distanceTips">
345
345
  <view :class="className" :style="style" class="text-22rpx text-#969696 flex items-center">
346
346
  <wd-icon name="location" />
347
347
  <view>{{ value }}</view>
348
348
  </view>
349
349
  </slot>
350
350
 
351
- <slot :value="value" v-if="prop === 'headImg'" name="headImg">
351
+ <slot :value="value" v-else-if="prop === 'headImg'" name="headImg">
352
352
  <img
353
353
  :src="value + `?x-oss-process=image/resize,m_mfit,w_${64}&imageView2/2/w/${64}`"
354
354
  class="block w-4 h-4 rounded-full"
@@ -357,7 +357,7 @@ const coverImgWidth = computed(() => {
357
357
  mode="aspectFill"
358
358
  />
359
359
  </slot>
360
- <slot :value="value" v-if="prop === 'userName'" name="userName">
360
+ <slot :value="value" v-else-if="prop === 'userName'" name="userName">
361
361
  <view
362
362
  :class="className"
363
363
  :style="style"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.73",
3
+ "version": "0.4.75",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -6,7 +6,7 @@ export interface LcbListInfo {
6
6
  }
7
7
  export interface LcbFilterResult {
8
8
  btnComponent: BtnComponent
9
- filterTags: FilterTags
9
+ filterTags: FilterTags[]
10
10
  filterComponent: FilterComponent[]
11
11
  listInfo: LcbListInfo
12
12
  filterTabs?: {