@tplc/business 0.2.28 → 0.2.29

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,36 @@
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.29](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.23...v0.2.29) (2024-12-23)
6
+
7
+
8
+ ### 🐛 Bug Fixes | Bug 修复
9
+
10
+ * 修改action-view request 引入 ([373a160](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/373a160bd91eef12a43e96d74ac1e0fa459a7573))
11
+
12
+
13
+ ### 🚀 Chore | 构建/工程依赖/工具
14
+
15
+ * **release:** 0.2.23 ([b57c35b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b57c35b38a1a5fbafa6dad8b34ab94a44a63b8f8))
16
+ * **release:** 0.2.24 ([aaf6d5d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/aaf6d5d2faa2202011b9265d86d5832b17ae6dd3))
17
+ * **release:** 0.2.25 ([b79e940](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b79e94054bb157ede7deb8250ea20d92d034263e))
18
+ * **release:** 0.2.26 ([b83ddd6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b83ddd651440ff63ef853a450353a4e7849fcec1))
19
+ * **release:** 0.2.27 ([5afe7f2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5afe7f29c4f7544bb1e25481f659a642c7193e6c))
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * action-view 新增request ([a9de65c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a9de65ccb7da95be194438a0cca12c917343a272))
25
+ * action-view 新增锚点类型 ([a34dc9f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a34dc9f31a526ceb4c6b52a43e51f2e72fa91f6d))
26
+ * engine 滚动 ([dc52e8f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dc52e8fce4a4a8e41d71c5b8321e1b1ac4157eb4))
27
+ * FilterList height ([e2e3f72](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e2e3f721ff5889b25f7217f6b4e8ac692cf5ed55))
28
+ * list 兼容 ([2620bd1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2620bd13d25ca0d7e58f9dc9fa459b5d46deb4c3))
29
+ * list 支持 options ([7942bf8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7942bf85e27ce9f33e8f92d465885a1566733c09))
30
+ * 微调假数据 ([89a9fd5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/89a9fd5cc9d75b5f1d882978bcde2073e61237bf))
31
+ * 日历初始化 ([6e2f4d9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6e2f4d9391f5e2a2e7cebc6f960a3002bf6f4d66))
32
+ * 调整 lcb-product-item 样式 ([943e9a0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/943e9a0643d025037be35f4e03746d1254b6379b))
33
+ * 页面滚动 ([2645508](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2645508cdf2a82034e94dc48223600edfb170123))
34
+
5
35
  ### [0.2.28](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.23...v0.2.28) (2024-12-21)
6
36
 
7
37
  ### [0.2.27](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.26...v0.2.27) (2024-12-20)
@@ -122,7 +122,8 @@ const onActionClick = async () => {
122
122
  if (url) anchor.value = url
123
123
  break
124
124
  case 17:
125
- await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
125
+ if (props.requestInfo)
126
+ await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
126
127
  emits('refresh')
127
128
  break
128
129
  /** 新窗口跳到页面 */
@@ -173,7 +174,7 @@ const onActionClick = async () => {
173
174
  })
174
175
  break
175
176
  case 105:
176
- uni.openLocation(props.addressInfo)
177
+ if (props.addressInfo) uni.openLocation(props.addressInfo)
177
178
  break
178
179
  default:
179
180
  emits('click')
@@ -45,14 +45,14 @@ export type LcbActionViewProps = {
45
45
  }
46
46
  | {
47
47
  jumpType: 17
48
- requestInfo: {
48
+ requestInfo?: {
49
49
  requestUrl: string
50
50
  requestParams: Record<string, any>
51
51
  }
52
52
  }
53
53
  | {
54
54
  jumpType: 105
55
- addressInfo: {
55
+ addressInfo?: {
56
56
  address: string
57
57
  latitude: number
58
58
  longitude: number
@@ -41,16 +41,29 @@ const modelValue = defineModel<unknown[]>({
41
41
  })
42
42
  watchEffect(() => {
43
43
  const list = dataList.value?.map?.((item: any) => {
44
- const imgArr = formatJson(item.coverImg, [])
45
- const tags = formatJson(item.tags, [])
44
+ return item
45
+ // 以下假数据无效
46
+ // const imgArr = formatJson(item.coverImg, [])
47
+ // const tags = formatJson(item.tags, [])
48
+ // eslint-disable-next-line no-unreachable
46
49
  return {
47
- image: imgArr?.[1] || imgArr?.[0],
48
50
  title: item?.productName,
49
- location: item?.address,
51
+ addressIntro: item?.address,
50
52
  price: item?.price,
51
53
  priceSuffix: item?.behindUnit,
54
+ subTitle: '专用通道接送8分钟到候机楼',
55
+ score: 4.7,
56
+ scoreTips: '很好',
57
+ level: 4,
58
+ // imgCornerIcon: 'test',
59
+ // imgBottomIcon: 'test',
60
+ titleIcon: 'I',
61
+ userInteractionInfo: '2991点评 · 8039收藏',
62
+ orderTips: '18分钟前有人预定',
63
+ priceTips: '白银贵宾价 | 十亿豪补 | 2项优惠',
52
64
  ...item,
53
- tags,
65
+ // coverImg: imgArr?.[1] || imgArr?.[0],
66
+ // tags,
54
67
  }
55
68
  })
56
69
  modelValue.value = list
@@ -16,8 +16,8 @@ const props = withDefaults(defineProps<LcbProductProps>(), {
16
16
  listType: 'list',
17
17
  items: [],
18
18
  imageWidthPercent: (1 / 3) * 100,
19
- imageHeightPercent: (300 / 560) * 100,
20
- itemHeight: 560,
19
+ imageHeightPercent: (260 / 670) * 100,
20
+ itemHeight: 670,
21
21
  } as any)
22
22
  defineSlots<{
23
23
  item(props: { item: any }): any
@@ -45,11 +45,11 @@ defineSlots<{
45
45
  <lcb-product-item
46
46
  v-else
47
47
  v-bind="{ ...item, ...attrs }"
48
- :imageStyle="{
48
+ :coverImgStyle="{
49
49
  width: imageWidth ?? `${imageWidthPercent}%`,
50
50
  height: imageHeight ? `${imageHeight}rpx` : undefined,
51
51
  borderRadius: imageRadius ? `${imageRadius}rpx` : undefined,
52
- ...(attrs?.imageStyle ?? {}),
52
+ ...(attrs?.coverImgStyle ?? {}),
53
53
  }"
54
54
  >
55
55
  <!-- <template #itemTopSection>
@@ -101,9 +101,9 @@ defineSlots<{
101
101
  v-bind="{ ...item, ...attrs }"
102
102
  layoutType="vertical"
103
103
  className="!h-full"
104
- :imageStyle="{
104
+ :coverImgStyle="{
105
105
  height: imageHeight ?? `${imageHeightPercent}%`,
106
- ...(attrs?.imageStyle ?? {}),
106
+ ...(attrs?.coverImgStyle ?? {}),
107
107
  }"
108
108
  >
109
109
  <!-- <template #itemTopSection>
@@ -150,7 +150,7 @@ defineSlots<{
150
150
  tag-overflow-wrap
151
151
  :title-line-clamp="2"
152
152
  >
153
- <template #image="{ value }">
153
+ <template #coverImg="{ value }">
154
154
  <image :src="value" class="w-full" mode="widthFix" />
155
155
  </template>
156
156
  <!-- <template #itemTopSection>
@@ -207,7 +207,7 @@ defineSlots<{
207
207
  tag-overflow-wrap
208
208
  :title-line-clamp="2"
209
209
  >
210
- <template #image="{ value }">
210
+ <template #coverImg="{ value }">
211
211
  <image :src="value" class="w-full" mode="widthFix" />
212
212
  </template>
213
213
  <!-- <template #itemTopSection>
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, computed, useAttrs } from 'vue'
3
3
  import { isArray } from '@tplc/wot/components/common/util'
4
+ import { formatJson } from '../../../utils/utils'
4
5
  defineOptions({
5
6
  name: 'LcbProductItemView',
6
7
  options: {
@@ -22,18 +23,26 @@ const props = withDefaults(
22
23
  )
23
24
 
24
25
  defineSlots<{
25
- image(props: { value: any }): any
26
+ coverImg(props: { value: any }): any
26
27
  title(props: { value: any }): any
27
28
  subTitle(props: { value: any }): any
28
29
  price(props: { value: any }): any
29
30
  priceUnit(props: { value: any }): any
30
31
  priceSuffix(props: { value: any }): any
31
- originPrice(props: { value: any }): any
32
- originPriceUnit(props: { value: any }): any
33
- originPriceSuffix(props: { value: any }): any
32
+ scribePrice(props: { value: any }): any
33
+ scribePriceUnit(props: { value: any }): any
34
+ scribePriceSuffix(props: { value: any }): any
34
35
  tags(props: { value: any }): any
35
- location(props: { value: any }): any
36
+ addressIntro(props: { value: any }): any
36
37
  distance(props: { value: any }): any
38
+ score(props: { value: any }): any
39
+ scoreTips(props: { value: any }): any
40
+ level(props: { value: any }): any
41
+ imgCornerIcon(props: { value: any }): any
42
+ imgBottomIcon(props: { value: any }): any
43
+ titleIcon(props: { value: any }): any
44
+ userInteractionInfo(props: { value: any }): any
45
+ orderTips(props: { value: any }): any
37
46
  }>()
38
47
 
39
48
  const visible = computed(() => {
@@ -46,16 +55,28 @@ const style = computed(() => {
46
55
  return itemProps?.[`${props?.prop}Style`] ?? ''
47
56
  })
48
57
  const value = computed(() => {
58
+ if (props?.prop === 'coverImg') {
59
+ const imgArr = formatJson(itemProps?.[props?.prop], [])
60
+ return imgArr?.[1] || imgArr?.[0]
61
+ }
62
+
63
+ if (props?.prop === 'tags') {
64
+ const tags = formatJson(itemProps?.[props?.prop], [])
65
+ return tags
66
+ }
67
+
49
68
  return itemProps?.[props?.prop]
50
69
  })
51
70
  </script>
52
71
 
53
72
  <template>
54
73
  <template
55
- v-if="visible && (prop === 'image' || (!!value && (isArray(value) ? value?.length > 0 : true)))"
74
+ v-if="
75
+ visible && (prop === 'coverImg' || (!!value && (isArray(value) ? value?.length > 0 : true)))
76
+ "
56
77
  >
57
78
  <!-- 图片 -->
58
- <slot :value="value" v-if="prop === 'image'" name="image">
79
+ <slot :value="value" v-if="prop === 'coverImg'" name="coverImg">
59
80
  <view :class="className" :style="style">
60
81
  <image :src="value" class="w-full h-full" mode="aspectFill" />
61
82
  <slot></slot>
@@ -67,16 +88,55 @@ const value = computed(() => {
67
88
  <view
68
89
  :class="[
69
90
  className,
70
- 'text-ellipsis',
71
- {
72
- 'line-clamp-1': itemProps?.titleLineClamp === 1,
73
- 'line-clamp-2': itemProps?.titleLineClamp === 2,
74
- 'line-clamp-3': itemProps?.titleLineClamp === 3,
75
- },
91
+ 'inline text-[32rpx] font-bold',
92
+ // {
93
+ // 'line-clamp-1': itemProps?.titleLineClamp === 1,
94
+ // 'line-clamp-2': itemProps?.titleLineClamp === 2,
95
+ // 'line-clamp-3': itemProps?.titleLineClamp === 3,
96
+ // },
76
97
  ]"
77
98
  :style="style"
78
99
  :value="value"
79
100
  >
101
+ {{ value }}
102
+ </view>
103
+ </slot>
104
+
105
+ <slot :value="value" v-if="prop === 'level'" name="level">
106
+ <view :class="className" :style="style" class="inline pl-1 relative top-[-3px]">
107
+ <wd-rate v-model="value" :num="value" readonly size="12px" space="2px" />
108
+ </view>
109
+ </slot>
110
+ <slot :value="value" v-if="prop === 'titleIcon'" name="titleIcon">
111
+ <view :class="className" :style="style" class="inline pl-1">
112
+ <wd-icon
113
+ name="thumb-up"
114
+ size="12px"
115
+ custom-class="bg-[#EB723F] text-white p-[1px] rounded"
116
+ ></wd-icon>
117
+ </view>
118
+ </slot>
119
+
120
+ <slot :value="value" v-if="prop === 'score'" name="score">
121
+ <view :class="className" :style="style" class="">
122
+ <wd-tag
123
+ custom-class="!text-24rpx relative top-[-2px]"
124
+ :color="'#ffffff'"
125
+ :bg-color="'#4554F0'"
126
+ >
127
+ {{ value }}
128
+ </wd-tag>
129
+ </view>
130
+ </slot>
131
+
132
+ <slot :value="value" v-if="prop === 'scoreTips'" name="scoreTips">
133
+ <view :class="className" :style="style" class="text-[#4554F0] font-bold">
134
+ <view>{{ value }}</view>
135
+ </view>
136
+ </slot>
137
+
138
+ <slot :value="value" v-if="prop === 'userInteractionInfo'" name="userInteractionInfo">
139
+ <view :class="className" :style="style" class="text-ellipsis line-clamp-1 flex-1">
80
140
  <view>{{ value }}</view>
81
141
  </view>
82
142
  </slot>
@@ -86,20 +146,21 @@ const value = computed(() => {
86
146
  <view
87
147
  :class="className"
88
148
  :style="style"
89
- class="text-22rpx text-gray-500 text-ellipsis line-clamp-1"
149
+ class="text-[#434D96] text-26rpx flex gap-3rpx items-center"
90
150
  >
91
- <view>{{ value }}</view>
151
+ <!-- <wd-icon name="location" size="32rpx"></wd-icon> -->
152
+ <view class="text-ellipsis line-clamp-1">{{ value }}</view>
92
153
  </view>
93
154
  </slot>
94
155
 
95
156
  <!-- 位置 -->
96
- <slot :value="value" v-if="prop === 'location'" name="location">
157
+ <slot :value="value" v-if="prop === 'addressIntro'" name="addressIntro">
97
158
  <view
98
159
  :class="className"
99
160
  :style="style"
100
- class="text-gray-500 text-22rpx flex gap-3rpx items-center"
161
+ class="text-gray-700 text-26rpx flex gap-3rpx items-center"
101
162
  >
102
- <wd-icon name="location" size="32rpx"></wd-icon>
163
+ <!-- <wd-icon name="location" size="32rpx"></wd-icon> -->
103
164
  <view class="text-ellipsis line-clamp-1">{{ value }}</view>
104
165
  </view>
105
166
  </slot>
@@ -132,10 +193,9 @@ const value = computed(() => {
132
193
  <wd-tag
133
194
  v-for="tag in value"
134
195
  :key="tag"
135
- class="!text-20rpx"
136
- :class="className"
196
+ :custom-class="`!text-22rpx ${className}`"
137
197
  :style="style"
138
- :color="itemProps?.tagContentColor"
198
+ :color="itemProps?.tagContentColor ?? '#434D96'"
139
199
  :bg-color="itemProps?.tagBgColor"
140
200
  :plain="itemProps?.tagPlain ?? true"
141
201
  :mark="itemProps?.tagMark ?? false"
@@ -149,7 +209,7 @@ const value = computed(() => {
149
209
 
150
210
  <!-- 价格单位 -->
151
211
  <slot :value="value" v-if="prop === 'priceUnit'" name="priceUnit">
152
- <view :class="className" :style="style" class="text-red-500 font-bold text-22rpx">
212
+ <view :class="className" :style="style" class="text-[#4554F0] font-bold text-22rpx">
153
213
  <view>{{ value }}</view>
154
214
  </view>
155
215
  </slot>
@@ -160,38 +220,69 @@ const value = computed(() => {
160
220
  :class="className"
161
221
  :style="style"
162
222
  :value="value"
163
- class="text-red-500 font-bold text-27rpx"
223
+ class="text-[#4554F0] font-bold text-27rpx"
164
224
  >
165
225
  <view>{{ value }}</view>
166
226
  </view>
167
227
  </slot>
168
228
 
229
+ <!-- 价格标签 -->
230
+ <slot :value="value" v-if="prop === 'priceTips'" name="priceTips">
231
+ <view
232
+ :class="className"
233
+ :style="style"
234
+ :value="value"
235
+ class="text-[#EC6F39] text-20rpx bg-[#FCF2E7] pl-1 py-[1px] flex gap-1rpx items-center"
236
+ >
237
+ <view class="text-ellipsis line-clamp-1">{{ value }}</view>
238
+ <wd-icon name="arrow-right" size="12px"></wd-icon>
239
+ </view>
240
+ </slot>
241
+
169
242
  <!-- 价格后缀 -->
170
243
  <slot :value="value" v-if="prop === 'priceSuffix'" name="priceSuffix">
171
- <view :class="className" :style="style" class="text-22rpx">
244
+ <view :class="className" :style="style" class="text-22rpx text-[#4554F0]">
172
245
  <view>{{ value }}</view>
173
246
  </view>
174
247
  </slot>
175
248
 
176
249
  <!-- 原始价格单位 -->
177
- <slot :value="value" v-if="prop === 'originPriceUnit'" name="originPriceUnit">
250
+ <slot :value="value" v-if="prop === 'scribePriceUnit'" name="scribePriceUnit">
178
251
  <view :class="className" :style="style" class="text-gray-500 font-bold text-19rpx">
179
252
  <view>{{ value }}</view>
180
253
  </view>
181
254
  </slot>
182
255
 
183
256
  <!-- 原始价格 -->
184
- <slot :value="value" v-if="prop === 'originPrice'" name="originPrice">
257
+ <slot :value="value" v-if="prop === 'scribePrice'" name="scribePrice">
185
258
  <view :class="className" :style="style" class="text-gray-500 font-bold text-20rpx">
186
259
  <view>{{ value }}</view>
187
260
  </view>
188
261
  </slot>
189
262
 
190
263
  <!-- 原始价格后缀 -->
191
- <slot :value="value" v-if="prop === 'originPriceSuffix'" name="originPriceSuffix">
264
+ <slot :value="value" v-if="prop === 'scribePriceSuffix'" name="scribePriceSuffix">
192
265
  <view :class="className" :style="style" class="text-gray-500 text-20rpx">
193
266
  <view>{{ value }}</view>
194
267
  </view>
195
268
  </slot>
269
+
270
+ <slot :value="value" v-if="prop === 'imgCornerIcon'" name="imgCornerIcon">
271
+ <view :class="className" :style="style" class="">
272
+ <view>{{ value }}</view>
273
+ </view>
274
+ </slot>
275
+
276
+ <slot :value="value" v-if="prop === 'imgBottomIcon'" name="imgBottomIcon">
277
+ <view :class="className" :style="style" class="">
278
+ <view>{{ value }}</view>
279
+ </view>
280
+ </slot>
281
+
282
+ <slot :value="value" v-if="prop === 'orderTips'" name="orderTips">
283
+ <view :class="className" :style="style" class="text-22rpx text-gray-500">
284
+ <view>{{ value }}</view>
285
+ </view>
286
+ </slot>
196
287
  </template>
197
288
  </template>