@tplc/business 0.2.31 → 0.2.33

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,41 @@
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.33](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.32...v0.2.33) (2024-12-25)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * height 兼容h5 ([dac82fa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/dac82fa388f71112663e4b3d124eb7ed968ab03d))
11
+
12
+
13
+ ### 🐛 Bug Fixes | Bug 修复
14
+
15
+ * 修复autoheight 高度不对 ([4fae567](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/4fae5676f56e7027effb29c625842757af32dcc3))
16
+ * 修改布局高度 ([cf41a37](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cf41a37f9d87e8e72309e0a8bde18c37d047fb45))
17
+ * 暂时修复item不显示 ([398caf8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/398caf81ff428f3c730083cb3ce133e0887b0a09))
18
+
19
+ ### [0.2.32](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.27...v0.2.32) (2024-12-24)
20
+
21
+
22
+ ### 🚀 Chore | 构建/工程依赖/工具
23
+
24
+ * **release:** 0.2.23 ([c40fd71](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c40fd71862a370b440805701726a4fd7878b8762))
25
+ * **release:** 0.2.29 ([9b9fbc1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9b9fbc17564569299146ba00b39ac7f7e0176823))
26
+ * **release:** 0.2.30 ([de61218](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/de6121804a1e2c71bea4c63f67dc49268986dcbd))
27
+ * **release:** 0.2.31 ([8e87d8b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8e87d8b026358d018db906293ce178a85968faf6))
28
+
29
+
30
+ ### ✨ Features | 新功能
31
+
32
+ * FilterList height ([e2e3f72](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e2e3f721ff5889b25f7217f6b4e8ac692cf5ed55))
33
+ * list 兼容 ([2620bd1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2620bd13d25ca0d7e58f9dc9fa459b5d46deb4c3))
34
+ * 微调假数据 ([89a9fd5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/89a9fd5cc9d75b5f1d882978bcde2073e61237bf))
35
+ * 日历初始化 ([6e2f4d9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6e2f4d9391f5e2a2e7cebc6f960a3002bf6f4d66))
36
+ * 更新getWindowInfo ([8f6c362](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8f6c362b39fbcae9525bde3607faf75257aea67e))
37
+ * 调整 lcb-product-item 样式 ([943e9a0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/943e9a0643d025037be35f4e03746d1254b6379b))
38
+ * 跳转itemview ([ee96b16](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ee96b16f46d2c14fb253a4a9719e4817c4e54fec))
39
+
5
40
  ### [0.2.31](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.30...v0.2.31) (2024-12-23)
6
41
 
7
42
  ### [0.2.30](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.29...v0.2.30) (2024-12-23)
@@ -42,29 +42,29 @@ const modelValue = defineModel<unknown[]>({
42
42
  watchEffect(() => {
43
43
  const list = dataList.value?.map?.((item: any) => {
44
44
  return item
45
- // 以下假数据无效
46
- // const imgArr = formatJson(item.coverImg, [])
47
- // const tags = formatJson(item.tags, [])
48
- // eslint-disable-next-line no-unreachable
49
- return {
50
- title: item?.productName,
51
- addressIntro: item?.address,
52
- price: item?.price,
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项优惠',
64
- ...item,
65
- // coverImg: imgArr?.[1] || imgArr?.[0],
66
- // tags,
67
- }
45
+ // // 以下假数据无效
46
+ // // const imgArr = formatJson(item.coverImg, [])
47
+ // // const tags = formatJson(item.tags, [])
48
+ // // eslint-disable-next-line no-unreachable
49
+ // return {
50
+ // title: item?.productName,
51
+ // addressIntro: item?.address,
52
+ // price: item?.price,
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项优惠',
64
+ // ...item,
65
+ // // coverImg: imgArr?.[1] || imgArr?.[0],
66
+ // // tags,
67
+ // }
68
68
  })
69
69
  modelValue.value = list
70
70
  })
@@ -84,7 +84,7 @@
84
84
 
85
85
  <script setup lang="ts">
86
86
  import { addUnit } from '@tplc/wot/components/common/util'
87
- import { computed, inject } from 'vue'
87
+ import { computed, inject, watch } from 'vue'
88
88
  import { ICapsule, NavProps } from './types'
89
89
  import Title from './Title/index.vue'
90
90
  import Search from './Search/index.vue'
@@ -124,7 +124,6 @@ const props = withDefaults(defineProps<NavProps>(), {
124
124
  capsuleMode: 'light',
125
125
  immersionMode: 1,
126
126
  })
127
-
128
127
  const navbarBgColor = computed(() => {
129
128
  return props.backgroundType === 'color' ? props.backColor : ''
130
129
  })
@@ -24,7 +24,7 @@ const props = withDefaults(
24
24
 
25
25
  defineSlots<{
26
26
  coverImg(props: { value: any }): any
27
- title(props: { value: any }): any
27
+ productName(props: { value: any }): any
28
28
  subTitle(props: { value: any }): any
29
29
  price(props: { value: any }): any
30
30
  priceUnit(props: { value: any }): any
@@ -35,7 +35,7 @@ defineSlots<{
35
35
  tags(props: { value: any }): any
36
36
  addressIntro(props: { value: any }): any
37
37
  distance(props: { value: any }): any
38
- score(props: { value: any }): any
38
+ scoreAvg(props: { value: any }): any
39
39
  scoreTips(props: { value: any }): any
40
40
  level(props: { value: any }): any
41
41
  imgCornerIcon(props: { value: any }): any
@@ -84,20 +84,8 @@ const value = computed(() => {
84
84
  </slot>
85
85
 
86
86
  <!-- 标题 -->
87
- <slot :value="value" v-if="prop === 'title'" name="title">
88
- <view
89
- :class="[
90
- className,
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
- // },
97
- ]"
98
- :style="style"
99
- :value="value"
100
- >
87
+ <slot :value="value" v-if="prop === 'productName'" name="productName">
88
+ <view :class="[className, 'inline text-[32rpx] font-bold']" :style="style" :value="value">
101
89
  {{ value }}
102
90
  </view>
103
91
  </slot>
@@ -117,7 +105,7 @@ const value = computed(() => {
117
105
  </view>
118
106
  </slot>
119
107
 
120
- <slot :value="value" v-if="prop === 'score'" name="score">
108
+ <slot :value="value" v-if="prop === 'scoreAvg'" name="scoreAvg">
121
109
  <view :class="className" :style="style" class="">
122
110
  <wd-tag
123
111
  custom-class="!text-24rpx relative top-[-2px]"
@@ -52,7 +52,7 @@ provide('lcb-product-item-props', props)
52
52
 
53
53
  defineSlots<{
54
54
  coverImg(props: { value: any }): any
55
- title(props: { value: any }): any
55
+ productName(props: { value: any }): any
56
56
  subTitle(props: { value: any }): any
57
57
  price(props: { value: any }): any
58
58
  priceUnit(props: { value: any }): any
@@ -63,7 +63,7 @@ defineSlots<{
63
63
  tags(props: { value: any }): any
64
64
  addressIntro(props: { value: any }): any
65
65
  distance(props: { value: any }): any
66
- score(props: { value: any }): any
66
+ scoreAvg(props: { value: any }): any
67
67
  scoreTips(props: { value: any }): any
68
68
  level(props: { value: any }): any
69
69
  imgCornerIcon(props: { value: any }): any
@@ -121,12 +121,12 @@ defineSlots<{
121
121
  <slot name="contentSection" />
122
122
  <view class="flex flex-col gap-[5px] overflow-hidden">
123
123
  <!-- <template
124
- v-for="propName in ['title', 'subTitle', 'addressIntro', 'distance', 'tags']"
124
+ v-for="propName in ['productName', 'subTitle', 'addressIntro', 'distance', 'tags']"
125
125
  :key="propName"
126
126
  >
127
127
  <ItemValue :prop="propName" v-if="!!$slots?.[propName]">
128
128
  <template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
129
- <template #title="{ value }"><slot name="title" :value="value" /></template>
129
+ <template #productName="{ value }"><slot name="productName" :value="value" /></template>
130
130
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
131
131
  <template #price="{ value }"><slot name="price" :value="value" /></template>
132
132
  <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
@@ -148,53 +148,53 @@ defineSlots<{
148
148
  <ItemValue :prop="propName" v-else />
149
149
  </template> -->
150
150
  <view class="text-ellipsis line-clamp-2">
151
- <ItemValue prop="title">
152
- <template #title="{ value }"><slot name="title" :value="value" /></template>
151
+ <ItemValue prop="productName">
152
+ <!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
153
153
  </ItemValue>
154
154
  <ItemValue prop="level">
155
- <template #level="{ value }"><slot name="level" :value="value" /></template>
155
+ <!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
156
156
  </ItemValue>
157
157
  <ItemValue prop="titleIcon">
158
- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
158
+ <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
159
159
  </ItemValue>
160
160
  </view>
161
161
 
162
162
  <view className="flex gap-1 items-center">
163
- <ItemValue prop="score">
164
- <template #score="{ value }"><slot name="score" :value="value" /></template>
163
+ <ItemValue prop="scoreAvg">
164
+ <!-- <template #scoreAvg="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
165
165
  </ItemValue>
166
166
  <ItemValue prop="scoreTips">
167
- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
167
+ <!-- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template> -->
168
168
  </ItemValue>
169
169
  <ItemValue prop="userInteractionInfo">
170
- <template #userInteractionInfo="{ value }">
171
- <slot name="userInteractionInfo" :value="value" />
172
- </template>
170
+ <!-- <template #userInteractionInfo="{ value }"> -->
171
+ <!-- <slot name="userInteractionInfo" :value="value" /> -->
172
+ <!-- </template> -->
173
173
  </ItemValue>
174
174
  </view>
175
175
 
176
176
  <ItemValue prop="addressIntro">
177
- <template #addressIntro="{ value }">
178
- <slot name="addressIntro" :value="value" />
179
- </template>
177
+ <!-- <template #addressIntro="{ value }"> -->
178
+ <!-- <slot name="addressIntro" :value="value" /> -->
179
+ <!-- </template> -->
180
180
  </ItemValue>
181
181
 
182
182
  <ItemValue prop="subTitle">
183
- <template #subTitle="{ value }">
184
- <slot name="subTitle" :value="value" />
185
- </template>
183
+ <!-- <template #subTitle="{ value }"> -->
184
+ <!-- <slot name="subTitle" :value="value" /> -->
185
+ <!-- </template> -->
186
186
  </ItemValue>
187
187
 
188
188
  <ItemValue prop="tags">
189
- <template #tags="{ value }">
190
- <slot name="tags" :value="value" />
191
- </template>
189
+ <!-- <template #tags="{ value }"> -->
190
+ <!-- <slot name="tags" :value="value" /> -->
191
+ <!-- </template> -->
192
192
  </ItemValue>
193
193
 
194
194
  <ItemValue prop="orderTips">
195
- <template #orderTips="{ value }">
196
- <slot name="orderTips" :value="value" />
197
- </template>
195
+ <!-- <template #orderTips="{ value }"> -->
196
+ <!-- <slot name="orderTips" :value="value" /> -->
197
+ <!-- </template> -->
198
198
  </ItemValue>
199
199
  </view>
200
200
 
@@ -272,12 +272,12 @@ defineSlots<{
272
272
  <slot name="contentSection" />
273
273
  <view class="flex flex-col gap-[5px] overflow-hidden">
274
274
  <!-- <template
275
- v-for="propName in ['title', 'subTitle', 'addressIntro', 'distance', 'tags']"
275
+ v-for="propName in ['productName', 'subTitle', 'addressIntro', 'distance', 'tags']"
276
276
  :key="propName"
277
277
  >
278
278
  <ItemValue :prop="propName" v-if="!!$slots?.[propName]">
279
279
  <template #coverImg="{ value }"><slot name="coverImg" :value="value" /></template>
280
- <template #title="{ value }"><slot name="title" :value="value" /></template>
280
+ <template #productName="{ value }"><slot name="productName" :value="value" /></template>
281
281
  <template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
282
282
  <template #price="{ value }"><slot name="price" :value="value" /></template>
283
283
  <template #priceUnit="{ value }"><slot name="priceUnit" :value="value" /></template>
@@ -299,53 +299,53 @@ defineSlots<{
299
299
  <ItemValue :prop="propName" v-else />
300
300
  </template> -->
301
301
  <view class="text-ellipsis line-clamp-2">
302
- <ItemValue prop="title">
303
- <template #title="{ value }"><slot name="title" :value="value" /></template>
302
+ <ItemValue prop="productName">
303
+ <!-- <template #productName="{ value }"><slot name="productName" :value="value" /></template> -->
304
304
  </ItemValue>
305
305
  <ItemValue prop="level">
306
- <template #level="{ value }"><slot name="level" :value="value" /></template>
306
+ <!-- <template #level="{ value }"><slot name="level" :value="value" /></template> -->
307
307
  </ItemValue>
308
308
  <ItemValue prop="titleIcon">
309
- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template>
309
+ <!-- <template #titleIcon="{ value }"><slot name="titleIcon" :value="value" /></template> -->
310
310
  </ItemValue>
311
311
  </view>
312
312
 
313
313
  <view className="flex gap-1 items-center">
314
- <ItemValue prop="score">
315
- <template #score="{ value }"><slot name="score" :value="value" /></template>
314
+ <ItemValue prop="scoreAvg">
315
+ <!-- <template #="{ value }"><slot name="scoreAvg" :value="value" /></template> -->
316
316
  </ItemValue>
317
317
  <ItemValue prop="scoreTips">
318
- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template>
318
+ <!-- <template #scoreTips="{ value }"><slot name="scoreTips" :value="value" /></template> -->
319
319
  </ItemValue>
320
320
  <ItemValue prop="userInteractionInfo">
321
- <template #userInteractionInfo="{ value }">
321
+ <!-- <template #userInteractionInfo="{ value }">
322
322
  <slot name="userInteractionInfo" :value="value" />
323
- </template>
323
+ </template> -->
324
324
  </ItemValue>
325
325
  </view>
326
326
 
327
327
  <ItemValue prop="addressIntro">
328
- <template #addressIntro="{ value }">
328
+ <!-- <template #addressIntro="{ value }">
329
329
  <slot name="addressIntro" :value="value" />
330
- </template>
330
+ </template> -->
331
331
  </ItemValue>
332
332
 
333
333
  <ItemValue prop="subTitle">
334
- <template #subTitle="{ value }">
334
+ <!-- <template #subTitle="{ value }">
335
335
  <slot name="subTitle" :value="value" />
336
- </template>
336
+ </template> -->
337
337
  </ItemValue>
338
338
 
339
339
  <ItemValue prop="tags">
340
- <template #tags="{ value }">
340
+ <!-- <template #tags="{ value }">
341
341
  <slot name="tags" :value="value" />
342
- </template>
342
+ </template> -->
343
343
  </ItemValue>
344
344
 
345
345
  <ItemValue prop="orderTips">
346
- <template #orderTips="{ value }">
346
+ <!-- <template #orderTips="{ value }">
347
347
  <slot name="orderTips" :value="value" />
348
- </template>
348
+ </template> -->
349
349
  </ItemValue>
350
350
  </view>
351
351
 
@@ -1,19 +1,21 @@
1
1
  import { getRect, isH5 } from '@tplc/wot/components/common/util'
2
2
  import { getCurrentInstance, onMounted, ref } from 'vue'
3
3
 
4
- const useAutoHeight = () => {
4
+ const useAutoHeight = (id = 'pagingTop') => {
5
5
  const { proxy } = getCurrentInstance() as any
6
6
  const isTabBar = uni.$lcb.getIsTabbar()
7
- const viewPageHeight = uni.getWindowInfo().windowHeight
7
+ const viewPageHeight = isH5 ? window.innerHeight : uni.getWindowInfo().screenHeight
8
8
  const height = ref('')
9
9
  onMounted(() => {
10
- getRect(`#pagingTop`, false, proxy).then((res) => {
11
- if (!isTabBar || isH5) {
12
- height.value = `${viewPageHeight - (res.top || 0)}px`
13
- } else {
14
- height.value = `calc(${viewPageHeight - (res.top || 0)}px - var(--window-bottom) - env(safe-area-inset-bottom))`
15
- }
16
- })
10
+ setTimeout(() => {
11
+ getRect(`#${id}`, false, proxy).then((res) => {
12
+ if (!isTabBar) {
13
+ height.value = `${viewPageHeight - (res.top || 0)}px`
14
+ } else {
15
+ height.value = `calc(${viewPageHeight - (res.top || 0)}px - var(--window-bottom) - env(safe-area-inset-bottom))`
16
+ }
17
+ })
18
+ }, 200)
17
19
  })
18
20
  return height
19
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.31",
3
+ "version": "0.2.33",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  declare function __VLS_template(): Readonly<{
2
2
  coverImg(props: { value: any }): any
3
- title(props: { value: any }): any
3
+ productName(props: { value: any }): any
4
4
  subTitle(props: { value: any }): any
5
5
  price(props: { value: any }): any
6
6
  priceUnit(props: { value: any }): any
@@ -11,7 +11,7 @@ declare function __VLS_template(): Readonly<{
11
11
  tags(props: { value: any }): any
12
12
  addressIntro(props: { value: any }): any
13
13
  distance(props: { value: any }): any
14
- score(props: { value: any }): any
14
+ scoreAvg(props: { value: any }): any
15
15
  scoreTips(props: { value: any }): any
16
16
  level(props: { value: any }): any
17
17
  imgCornerIcon(props: { value: any }): any
@@ -21,7 +21,7 @@ declare function __VLS_template(): Readonly<{
21
21
  orderTips(props: { value: any }): any
22
22
  }> & {
23
23
  coverImg(props: { value: any }): any
24
- title(props: { value: any }): any
24
+ productName(props: { value: any }): any
25
25
  subTitle(props: { value: any }): any
26
26
  price(props: { value: any }): any
27
27
  priceUnit(props: { value: any }): any
@@ -32,7 +32,7 @@ declare function __VLS_template(): Readonly<{
32
32
  tags(props: { value: any }): any
33
33
  addressIntro(props: { value: any }): any
34
34
  distance(props: { value: any }): any
35
- score(props: { value: any }): any
35
+ scoreAvg(props: { value: any }): any
36
36
  scoreTips(props: { value: any }): any
37
37
  level(props: { value: any }): any
38
38
  imgCornerIcon(props: { value: any }): any
@@ -1,7 +1,7 @@
1
1
  import { LcbProductItemProps } from './types'
2
2
  declare function __VLS_template(): Readonly<{
3
3
  coverImg(props: { value: any }): any
4
- title(props: { value: any }): any
4
+ productName(props: { value: any }): any
5
5
  subTitle(props: { value: any }): any
6
6
  price(props: { value: any }): any
7
7
  priceUnit(props: { value: any }): any
@@ -12,7 +12,7 @@ declare function __VLS_template(): Readonly<{
12
12
  tags(props: { value: any }): any
13
13
  addressIntro(props: { value: any }): any
14
14
  distance(props: { value: any }): any
15
- score(props: { value: any }): any
15
+ scoreAvg(props: { value: any }): any
16
16
  scoreTips(props: { value: any }): any
17
17
  level(props: { value: any }): any
18
18
  imgCornerIcon(props: { value: any }): any
@@ -30,7 +30,7 @@ declare function __VLS_template(): Readonly<{
30
30
  contentSection(): any
31
31
  }> & {
32
32
  coverImg(props: { value: any }): any
33
- title(props: { value: any }): any
33
+ productName(props: { value: any }): any
34
34
  subTitle(props: { value: any }): any
35
35
  price(props: { value: any }): any
36
36
  priceUnit(props: { value: any }): any
@@ -41,7 +41,7 @@ declare function __VLS_template(): Readonly<{
41
41
  tags(props: { value: any }): any
42
42
  addressIntro(props: { value: any }): any
43
43
  distance(props: { value: any }): any
44
- score(props: { value: any }): any
44
+ scoreAvg(props: { value: any }): any
45
45
  scoreTips(props: { value: any }): any
46
46
  level(props: { value: any }): any
47
47
  imgCornerIcon(props: { value: any }): any
@@ -1,2 +1,2 @@
1
- declare const useAutoHeight: () => import('vue').Ref<string>
1
+ declare const useAutoHeight: (id?: string) => import('vue').Ref<string>
2
2
  export default useAutoHeight